naturalCloud naturalCloud

记录精彩的程序人生

目录
编译php7.4
/    

编译php7.4

编译最新版本 php7.4

编译参数


1./configure  --prefix=/usr/local/php74 --with-config-file-path=/usr/local/php74/etc --enable-fpm --with-fpm-user=www --with-fpm-group=www --enable-inline-optimization --disable-debug --disable-rpath --enable-shared --enable-soap --with-xmlrpc --with-openssl  --with-sqlite3 --with-zlib --enable-bcmath --with-iconv --with-bz2 --enable-calendar --with-curl --with-cdb --enable-dom --enable-exif --enable-fileinfo --enable-filter  --enable-ftp --enable-gd --with-openssl-dir    --enable-gd-jis-conv --with-gettext --with-gmp --with-mhash --enable-json --enable-mbstring --enable-mbregex   --enable-pdo --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-zlib-dir --with-pdo-sqlite --enable-session --enable-shmop --enable-simplexml --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm   --with-xsl  --enable-mysqlnd-compression-support --with-pear --enable-opcache

中间可能遇到的错误 (乌班图 18.04)


1configure: error: Package requirements (sqlite3 > 3.7.4) were not met:
2No package 'sqlite3' found

解决方法 sudo apt-get install libsqlite3-dev


1configure: error: Package requirements (oniguruma) were not met:
2No package 'oniguruma' found

解决办法 sudo apt-get install libonig-dev


1configure: error: Package requirements (libpng) were not met:
2No package 'libpng' found

解决办法 sudo apt-get install libpng-dev


1configure: error: Package requirements (libzip >= 0.11) were not met:
2No package 'libzip' found

解决办法 sudo apt-get install libzip-dev


1configure: error: xml2-config not found. Please check your libxml2 installation.

解决办法 sudo apt-get install libxml2-dev


1configure: error: Cannot find OpenSSL's <evp.h>

解决办法 sudo apt-get install libssl-dev


1checking for cURL 7.15.5 or greater… configure: error: cURL version 7.15.5 or later is required to compile php with cURL support

解决办法 sudo apt-get install libcurl4-openssl-dev


1configure: error: Cannot find OpenSSL's libraries

解决办法 sudo apt-get install pkg-config


1configure: error: Cannot find zlib

解决办法 sudo apt-get install zlib1g-dev


1checking whether to enable JIS-mapped Japanese font support in GD… no
2If configure fails try --with-webp-dir=<DIR>
3configure: error: jpeglib.h not found.

解决办法 sudo apt-get install libjpeg-turbo8-dev


1configure: error: png.h not found.

解决办法 sudo apt-get install libpng-dev


1configure: error: freetype-config not found.

解决办法 sudo apt-get install libfreetype6-dev


1configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.

解决办法 sudo apt-get install libc-client2007e-dev


1configure: error: Kerberos libraries not found.
2Check the path given to --with-kerberos (if no path is given, searches in /usr/kerberos, /usr/local and /usr )

解决办法 sudo apt-get install libkrb5-dev


1configure: error: Cannot find pspell

解决办法 sudo apt-get install libpspell-dev


1configure: error: Please reinstall the libzip distribution

解决办法 sudo apt-get install libzip-dev


参考资料

Michael Kliewe blog
怎样编译安装 PHP7.4


标题:编译php7.4
作者:naturalCloud
地址:https://yunqiblog.cn/articles/2019/12/17/1576595284953.html