CENTOS 6.5 ,下载了PHP5.3的源码,解压后,执行配置命令:
./configure —prefix=/usr/local/php5 —with-config-file-path=/usr/local/php5/etc —with-config-file-scan-dir=/usr/local/php5/etc/php.d —with-bz2 —with-openssl —with-zlib —with-mhash —with-pcre —enable-exif —enable-sockets —enable-mbstring —enable-xml —enable-fpm —enable-soap —with-gd —with-curl —with-mcrypt —with-unixODBC —with-imap —with-imap-ssl —with-jpeg-dir —with-png-dir —with-zlib-dir —with-freetype-dir —enable-gd-native-ttf —enable-gd-jis-conv —with-mysqli —with-pdo-mysql —enable-dom —with-kerberos —disable-debug
一开始遇到两个错误,都是因为缺少安装依赖引起的,修正后再次运行上面的代码,就报错:
configure: warning: —with-config-file-path=/usr/local/php5/etc: invalid host type
configure: error: can only configure for one host and one target at a time
这怎么解决?Google了下也没找到办法,有谁遇到过吗?
Well, it looks like you have not installed GCC. Install it first.
google到的,参考一下咯
先用
./buildconf
进行系统监测。编译遇到的依赖问题可参考https://www.hongweipeng.com/i...