configure: error: freetype-config not found
Compiling php-7.3.21 from source
checking for the location of libwebp... no
checking for the location of libjpeg... yes
checking for the location of libpng... yes
checking for the location of libXpm... no
checking for FreeType 2... yes
checking whether to enable JIS-mapped Japanese font support in GD... no
If configure fails try --with-webp-dir=<DIR>
checking for jpeg_read_header in -ljpeg... yes
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=<DIR>
configure: error: freetype-config not found.
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target 'install'. Stop.
ln: failed to create symbolic link '/usr/local/php-7.3.21/sbin/php-7.3.21-fpm': No such file or directory
Solution
Install PHP 7.4.X instead (such as 7.4.12 at the time of writing), which uses pkg-config instead and goes around that error.
But then you might run into
configure: error: re2c 0.13.4 is required to generate PHP lexers.
Which can be fixed with
apt-get install re2c
Then you might run into
checking for sqlite3 > 3.7.4... no
configure: error: Package requirements (sqlite3 > 3.7.4) were not met:
No package 'sqlite3' found
apt-get install libsqlite3-dev sqlite3
Then you might run into
checking for oniguruma... no
configure: error: Package requirements (oniguruma) were not met:
No package 'oniguruma' found
apt-get install libonig-dev
Finally success !!
Generating files configure: patching main/php_config.h.in configure: creating ./config.status creating main/internal_functions.c creating main/internal_functions_cli.c config.status: creating main/build-defs.h config.status: creating scripts/phpize config.status: creating scripts/man1/phpize.1 config.status: creating scripts/php-config config.status: creating scripts/man1/php-config.1 config.status: creating sapi/cli/php.1 config.status: creating sapi/fpm/php-fpm.conf config.status: creating sapi/fpm/www.conf config.status: creating sapi/fpm/init.d.php-fpm config.status: creating sapi/fpm/php-fpm.service config.status: creating sapi/fpm/php-fpm.8 config.status: creating sapi/fpm/status.html config.status: creating sapi/phpdbg/phpdbg.1 config.status: creating sapi/cgi/php-cgi.1 config.status: creating ext/phar/phar.1 config.status: creating ext/phar/phar.phar.1 config.status: creating main/php_config.h config.status: executing default commands
+--------------------------------------------------------------------+ | License: | | This software is subject to the PHP License, available in this | | distribution in the file LICENSE. By continuing this installation | | process, you are bound by the terms of this license agreement. | | If you do not agree with the terms of this license, you must abort | | the installation process at this point. | +--------------------------------------------------------------------+
Thank you for using PHP.
(...)
Recent Comments