使用阿里云服务器编译php5.6时,产生的报错及解决办法
以下报错及解决办法在Centos6.9、Centos7.4系统,其他系统及版本请自测
报错一:
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
解决办法:
yum install gcc
报错二:
configure: error: xml2-config not found. Please check your libxml2 installation.
解决办法:
yum install libxml2-devel libxml2
报错三:
configure: error: Cannot find OpenSSL's <evp.h>
解决办法:
yum install openssl openssl-devel
报错四:
configure: error: Please reinstall the libcurl distribution -
easy.h should be in <curl-dir>/include/curl/
解决办法:
yum install curl curl-devel
报错五:
configure: error: jpeglib.h not found.
解决办法:
yum install libjpeg-devel
报错六:
configure: error: png.h not found.
解决办法:
yum install libpng-devel
报错七:
configure: error: freetype-config not found.
解决办法:
yum install freetype-devel
报错八:
configure: error: Unable to detect ICU prefix or no failed. Please verify ICU install prefix and make sure icu-config works.
解决办法:
yum install icu libicu libicu-devel
报错九:
configure: error: in /usr/local/src/php-5.6.35':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See config.log' for more details
解决办法:
yum install gcc-c++
报错十:
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
解决办法:
yum install libmcrypt libmcrypt-devel
报错十一:
configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
解决办法:
yum install libxslt libxslt-devel
报错十二:
configure: error: Cannot find ldap.h
解决办法:
yum install openldap openldap-devel
报错十三:
configure: error: Cannot find ldap libraries in /usr/lib.
解决办法:
cp -frp /usr/lib64/libldap* /usr/lib/
报错十四:
configure: error: Could not find net-snmp-config binary. Please check your net-snmp installation
解决办法:
yum install net-snmp-devel
报错十五:
configure: error: Unable to locate gmp.h
解决办法:
yum install gmp-devel