PHP版本:5.3.1,操作系统:centos5.4

手动编译安装GD,然后在安装PHP时指定GD安装路径,configure通过,make通过,make test无法通过:

imagecopyresampled() [ext/gd/tests/imagecopyresampled_basic.phpt] (warn:ing:require_once(skipif_imagetype.inc):failed to open stream:NO such file or directory in /usr/local/php-5.3.1/ext/gd/tests/imagecopyresampled_basic.skip.php on line 3)

imagedashedline() [ext/gd/tests/imagedashedline_basic.phpt] (warn:ing:require_once(skipif_imagetype.inc):failed to open stream:No such file or directory in /usr/local/php-5.3.1/ext/gd/tests/imagedashedline_basic.skip.php on line 3)
imageploygon() [ext/gd/tests/imagepolygon_basic.phpt] (warn:ing:require_once(skipif_imagetype.inc):failed to open stream:NO such file or directory in /usr/local/php-5.3.1/ext/gd/tests/imagepolygon_basic.skip.php on line 3)
via [ext/pdo_sqlite/tests/common.phpt] 
SQLite PDO Common:Bug #34630 (inserting streams as LOBs) [ext/pdo_sqlite/tests/bug_34630.phpt] (warn:XFAIL section but test passes) 
via [ext/pdo_sqlite/tests/common.phpt]
SQLite PDO Common:Bug #34630 (inserting streams as LOBs) [ext/pdo_sqlite/tests/bug_34630.phpt] (warn:XFAIL section but test passes)
重新编译第一次:按照PHP的PAQ所说,安装PHP时不指定GD安装路径。
configure通过,make无法通过:
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
重新编译第二次:编译时指定GD路径,对GD库的其它选项使用 --with-jpeg-dir=/usr/local --with-zlib-dir --with-png-dir=/usr/local --with-freetype-dir=/usr/local --with-gd=/usr/local/gd。
configure通过,make通过,make test时解决了前三个问题,只出现SQLite2 PDO和SQLite PDO的错误
重新编译第三次:因为phpmyadmin提示“无法加载mcrypt扩展,请检查您的PHP配置,所以重新编译PHP,加入--with-mcrypt选项,结果在编译PHP时遇到了不少问题。
1、Configure: error: libjpeg.(also) not found.
2、Configure: error: libpng.(also) not found.
解决:yum install libjpeg-devel
yum install libpng-devel
3、error: freetype.h not found.
解决:缺少freetype-devel,yum install freetype-devel
4、遇到configure: error: mcrypt.h not found. Please reinstall libmcrypt.而libcrypt已经安装,在网上查了一下资料,发现是缺少libmcrypt-devel。
解决:yum install libmcrypt-devel
重新编译第四次:遇到:
/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1
解决:错误原因是缺少libltdl。
yum install libtool-ltdl libtool-ltdl-devel
最终编译时指定了以下参数,禁用SQLite2 PDO和SQLite PDO,问题全部解决:
./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/share/mysql --with-jpeg-dir=/usr --with-png-dir=/usr --with-freetype-dir=/usr --with-gd --enable-exif --enable-mbstring --enable-soap --with-mcrypt --with-curl =/usr/local/curl --with-libxml-dir=/usr/local/libxml2 /bin/xml2-config --without-pdo-sqlite --without-sqlite 
本文转自 li_qinshan 51CTO博客,原文链接:http://blog.51cto.com/share/265798

centos5安装PHP5时遇到问题相关推荐

  1. centos6.4 yum装php,CentOS6.x/6.5/6.4/6.3/6.2/7.x 64位安装php5.2(使用YUM自动安装)

    搜索热词 默认情况下,CentOS6 64 bit 已经早已不支持PHP5.2.x ,但是某些PHP程序还需要zend optimizer支持,怎么办呢?目前大部分的yum repos 都已经不支持直 ...

  2. debian下编译安装php5.2

    debian下给编译安装的php配置optimizer 系统环境:debian 4 ++ apache2.2.16(包安装) ++ php 5.2.12 ++ zendoptimizer 3.3.9 ...

  3. 安装PHP5、PHP7

    安装 PHP5 PHP(Hypertext Preprocessor)英文超级文本预处理语言.PHP是一种HTML内嵌式的语言,是一种在服务端执行的嵌入HTML文档的脚本语言.官网:www.php.n ...

  4. 安装php时,configure: error: xml2-config not found. Please check your libxml2 installation

    参考文章:http://blog.csdn.net/anljf/article/details/6981247 安装php时的报错 configure: error: xml2-config not ...

  5. ubuntu编译安装php5 mysql nginx

    一.首先下载软件源码包 wget http://sysoev.ru/nginx/nginx-0.8.53.tar.gz wget http:/.s135.com/soft/linux/nginx_ph ...

  6. ubuntu 编译安装php mysql_ubuntu编译安装php5 mysql nginx

    一.首先下载软件源码包 wget http://sysoev.ru/nginx/nginx-0.8.53.tar.gz wget http:/.s135.com/soft/linux/nginx_ph ...

  7. 安装php时,make步骤报错make: *** [ext/gd/gd.lo] Error 1

    安装PHP时,make步骤报错make: *** [ext/gd/gd.lo] Error 1 /usr/local/src/LAMP+memcahed+catci/php-5.4.0/ext/gd/ ...

  8. iis6上安装PHP5.3.2及连接到SQL Server 2005/2008的设置(原创)

    iis6上安装PHP5.3.2及连接到SQL Server 2005/2008的设置(原创) 新增一台win2003 server系统的服务器.以前其他的服务器上使用php5.0/5.1,数据库是SQ ...

  9. 怎样安装php52-71,CentOS如何安装PHP5和PHP7

    推荐(免费):PHP7 安装PHP5下载解压二进制包[root@test-a src]# cd /usr/local/src/ [root@test-a src]# wget http://cn2.p ...

最新文章

  1. 10.ASCII码对照
  2. php 去除中英文空格,php去除字符串首尾中英文空格程序_PHP教程
  3. [libuv] libuv安装
  4. SQLAlchemy schema.MetaData
  5. 【CCNA Exploration 4.0 路由协议和概念3】
  6. 搞科研身体才是革命的本钱。
  7. 将virtio集成slipstream到windows iso,winpe – 原生方法和利用0pe
  8. Matlab之共轭转置与非共轭转置
  9. Unity经验分享——如何实现黑洞吸附效果
  10. 编译原理实验,赋值语句的语法分析程序设计
  11. MySQL数据导出:ERROR 1 (HY000) 错误解决
  12. c++ vector容器emplace_back
  13. phpstorm 报 expecting statement
  14. 微信每日早安推送 Windows版
  15. 萨提亚·纳德拉与沈向洋CVPR对谈:那些未来可期的计算机视觉研究与应用
  16. c语言long型是什么,c语言long类型是什么意思
  17. 看雪cm大赛第17题视频教程分析
  18. 一文读懂机器学习,大数据/自然语言处理/算法全有了
  19. 细说java.util.HashMap
  20. 第一次调网吧服务器的感觉

热门文章

  1. python定义test方法_关于python:使用pytest测试类方法
  2. r语言 新增一列数字类型_R语言实战之R语言基础语法精讲(一)
  3. Smoke Test Ad hoc Test
  4. java程序知识_java的基本知识点
  5. python标准库os_Python标准库 os
  6. java+swing+教科书,java+Swing+学生事务管理系统
  7. 出现身份验证错误,要求的函数不受支持,远程计算机:X.X.X.X,这可能是由于CredSSP加密Oracle修正
  8. multipart/form-data与application/octet-stream的区别、application/x-www-form-urlencoded
  9. 存到mysql的中文乱码_web项目存数据到数据库,中文乱码,解决过程
  10. c语言goto语句用法_C语言的9种控制结构