./configure --prefix=/usr/local/php \
--with-config-file-scan-dir=/usr/local/php/etc/ \
--with-mhash --with-pdo-pgsql \
--with-openssl \
--with-iconv \
--with-zlib \
--with-sqlite3=/usr/lib64 \
--enable-inline-optimization \
--disable-debug --disable-rpath \
--enable-shared --enable-xml \
--enable-bcmath --enable-shmop \
--enable-sysvsem --enable-sysvshm --enable-mbregex \
--enable-ftp \
--enable-pcntl --enable-sockets \
--with-xmlrpc --enable-soap \
--without-pear --with-gettext \
--enable-session --with-curl \
--enable-opcache --enable-fpm \
--without-gdbm --enable-fast-install \
--disable-fileinfo
报错信息:
Configuring extensions
checking io.h usability... no
checking io.h presence... no
checking for io.h... no
checking for strtoll... yes
checking for atoll... yes
checking whether to build with LIBXML support... yes
checking for libxml-2.0 >= 2.7.6... yes
checking for OpenSSL support... yes
checking for Kerberos support... no
checking whether to use system default cipher list instead of hardcoded value... no
checking for RAND_egd... no
checking for openssl >= 1.0.1... yes
checking for PCRE library to use... bundled
checking whether to enable PCRE JIT functionality... yes
checking whether to enable the SQLite3 extension... yes
checking for sqlite3 > 3.7.4... yes
checking for sqlite3_stmt_readonly in -lsqlite3... no
configure: error: Please install SQLite 3.7.4 first or check libsqlite3 is present
[root@localhost php-7.4.0]# sqlite3 -version
3.26.0 2018-12-01 12:34:55 bf8c1b2b7a5960c282e543b9c293686dccff272512d08865f4600fb58238alt1
[root@localhost php-7.4.0]# which sqlite3
/usr/bin/sqlite3
[root@localhost php-7.4.0]# find / -name libsqlite3.*
/usr/lib64/libsqlite3.so.0.8.6
/usr/lib64/libsqlite3.so.0
[root@localhost php-7.4.0]# echo $PKG_CONFIG_PATH
/usr/lib64/pkgconfig
如果禁用sqlite3的验证
./configure --prefix=/usr/local/php \
--with-config-file-scan-dir=/usr/local/php/etc/ \
--with-mhash --with-pdo-pgsql \
--with-openssl=/usr/include/openssl \
--with-iconv \
--with-zlib \
--enable-inline-optimization \
--disable-debug --disable-rpath \
--enable-shared --enable-xml \
--enable-bcmath --enable-shmop \
--enable-sysvsem --enable-sysvshm --enable-mbregex \
--enable-ftp \
--enable-pcntl --enable-sockets \
--with-xmlrpc --enable-soap \
--without-pear --with-gettext \
--enable-session --with-curl=/usr/lib64 \
--enable-opcache --enable-fpm \
--without-gdbm --enable-fast-install \
--without-sqlite3 \
--disable-fileinfo
则报错
Configuring extensions
checking io.h usability... no
checking io.h presence... no
checking for io.h... no
checking for strtoll... yes
checking for atoll... yes
checking whether to build with LIBXML support... yes
checking for libxml-2.0 >= 2.7.6... yes
checking for OpenSSL support... yes
checking for Kerberos support... no
checking whether to use system default cipher list instead of hardcoded value... no
checking for RAND_egd... no
checking for openssl >= 1.0.1... yes
checking for PCRE library to use... bundled
checking whether to enable PCRE JIT functionality... yes
checking whether to enable the SQLite3 extension... no
checking for ZLIB support... yes
checking for zlib >= 1.2.0.4... yes
checking whether to enable bc style precision math functions... yes
checking for BZip2 support... no
checking whether to enable calendar conversion support... no
checking whether to enable ctype functions... yes
checking for cURL support... yes
checking for libcurl >= 7.15.5... yes
checking for SSL support in libcurl... yes
checking for openssl support in libcurl... no
checking for curl_easy_perform in -lcurl... no
configure: error: There is something wrong. Please check config.log for more information.
[root@localhost php-7.4.0]# curl-config --version
libcurl 7.61.1
[root@localhost php-7.4.0]# openssl version
OpenSSL 1.1.1m 14 Dec 2021
[root@localhost php-7.4.0]#
系统是RHEL8