CentOS 7 下PHP 5.6.19编译安装详解(3)

[root@localhost php-5.6.19]# ./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql/ --with-openssl --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-mbstring --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir --enable-xml --enable-sockets --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-bz2 --enable-maintainer-zts

1、按照上面选项编译报错

checking libxml2 install dir... yes
checking for xml2-config path... 
configure: error: xml2-config not found. Please check your libxml2 installation.

显示内容是xml2-config找不到,发现libxml2已经安装但是安装文件没有xml2-config,安装libxml2-devel后

[root@localhost php-5.6.19]# rpm -ql libxml2-devel
/usr/bin/xml2-config
……

2、继续编译,报错如下

checking for BZip2 support... yes
checking for BZip2 in default path... not found
configure: error: Please reinstall the BZip2 distribution

安装bzip2-devel

[root@localhost php-5.6.19]# yum install bzip2-devel

3、继续编译,报错如下

checking for specified location of the MySQL UNIX socket... no
configure: error: Cannot find libmysqlclient_r under /usr/local/mysql/.
Note that the MySQL client library is not bundled anymore!

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/d0533cba5563c353963c0f275430753d.html