编译安装php时的几个报错解决方法

手动编译是挺麻烦的,一会出这个问题报错一会出那个问题报错,环境总是缺少那样或者这样的包没装,找到的资料留个备忘吧!

 1. 错误:  configure: error: libjpeg.(a|so) not found.

  解决:

   #yum install libjpeg libjpeg-devel -y

2. 错误:Configure: error: xml2-config not found. Please check your libxml2 installation.

  解决:

   #yum  install openssl openssl-devel -y

 3.  错误: Configure: error: Please reinstall the BZip2 distribution

   #yum install bzip2 bzip2-devel

 4.  错误:Configure: error: Please reinstall the libcurl distribution -

easy.h should be in <curl-dir>/include/curl/

  解决:

   #yum install curl curl-devel

  5.  错误:Configure: error: libpng.(also) not found

  解决:

   #yum install libpng libpng-devel

  6.  错误:Configure: error: freetype.h not found.

   #yum  install freetype-devel

  7. 错误:Configure: error: Unable to locate gmp.h

   解决:

   #yum install gmp-devel

  8. 错误:make 时报错:

   In file included from /root/php-5.2.17/sapi/cgi/fpm/fpm.c:12:

/root/php-5.2.17/sapi/cgi/fpm/fpm_env.h:20: 错误:与 ‘clearenv’ 类型冲突

/usr/include/stdlib.h:689: 错误:‘clearenv’ 的上一个声明在此
make: *** [sapi/cgi/fpm/fpm.lo] 错误 1

    解决:

    make时携带参数:#make ZEND_EXTRA_LIBS=’-liconv’

你可能感兴趣的:(PHP,安装,error,资料,休闲)