您的位置:首页 > 编程语言 > PHP开发

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

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

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’
本文出自 “DBQ blog” 博客,请务必保留此出处http://naonao.blog.51cto.com/1135983/806865
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: