在Linux下安装PHP过程中,编译时出现错误的解决办法

Linux下安装PHP过程中,编译时出现configure: error: libjpeg.(a|so) not found 错误的解决办法

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

检查之后发现已经安装了libjpeg

[root@localhost php-]# yum list installed|grep libpng
libpng.x86_64           :-.el6_2

或者:

[root@localhost php-]# rpm -qa|grep libjpeg
libjpeg-turbo--.el6_5.x86_64

安装libjpeg-devel

yum -y install libjpeg-devel

[root@localhost php-]# yum list installed|grep libjpeg
libjpeg-turbo.x86_64    -.el6_5   @base
libjpeg-turbo-devel.x86_64
[root@localhost php-]# rpm -ql libjpeg-turbo-devel.x86_64
/usr/include/jconfig.h
/usr/include/jerror.h
/usr/include/jmorecfg.h
/usr/include/jpeglib.h
/usr/lib64/libjpeg.so
/usr/share/doc/libjpeg-turbo-devel-
/usr/share/doc/libjpeg-turbo-devel-/coderules.txt
/usr/share/doc/libjpeg-turbo-devel-/example.c
/usr/share/doc/libjpeg-turbo-devel-/jconfig.txt
/usr/share/doc/libjpeg-turbo-devel-/libjpeg.txt
/usr/share/doc/libjpeg-turbo-devel-/structure.txt

但是在/usr/lib目录下没有libjpeg.so这个文件,在/usr/lib64下是有的,虽然使用–with-jpeg-dir=/usr/lib64 依然无效,最后用

[root@ www ~]#ln -s /usr/lib64/libjpeg.so.62 /usr/lib/libjpeg.so

 

问题解决, libpng 报的错误解决方法一样

configure: error: png.h not found.错误的解决方法

今天安装PHP的时候提示这个错误 configure: error: png.h not found.,这个是选择安装GD模块才会出现的错误,详细错误信息如下

If configure fails try --with-vpx-dir=<DIR>
If configure fails try --with-jpeg-dir=<DIR>
configure: error: png.h not found.

libpng没有安装,于是我执行命令

$>yum install libpng

但是并没有解决,想了下是不是还有什么devel包没安装吧,试了下面这个命令

$> yum install libpng-devel

终于解决了,呵呵。记录下来,方便大家和自己下次查看。

configure: error: Cannot find ldap.h  解决

[root@localhost php-]# yum list installed|grep ldap
apr-util-ldap.x86_64    -.el6_0. @anaconda-CentOS-.x86_64/6.4
openldap.x86_64         -.el6    @base

list

 yum list openldap
 yum list openldap-devel
 安装 :
 yum install openldap-devel
上一篇:PyQt4文件对话框QFileDialog


下一篇:转 Centos下安装apahce的configure: error: APR not found. Please read the documentation解决办法