PHP编译报错error: libjpeg.(a|so) not found.

编译PHP时报错:
[root@goolen php-5.3.6]# ./configure -prefix=/usr/local/php --enable-cgi -with-mysql=/tol/mysql/home/ --with-config-file-path=/usr/local/php/etc --with-pdo-mysql=/tol/mysql/home/bin/mysql --with-mysqli=/tol/mysql/home/bin/mysql_config --enable-zip --enable-sqlite-utf8 --enable-sockets --enable-soap --enable-pcntl --enable-mbstring --enable-intl --enable-calendar --enable-bcmath --enable-exif --with-mcrypt --with-mhash --with-gd --with-png-dir --with-jpeg-dir --with-freetype-dir --with-libxml-dir --with-curl --with-curlwrappers --with-zlib   --with-openssl --with-kerberos=shared --with-gettext=shared --with-xmlrpc=shared

。。。。
。。。。
checking OpenSSL dir for FTP... no
checking for GD support... yes
checking for the location of libjpeg... yes
checking for the location of libpng... yes
checking for the location of libXpm... no
checking for FreeType 2... yes
checking for T1lib support... no
checking whether to enable truetype string function in GD... no
checking whether to enable JIS-mapped Japanese font support in GD... no
checking for fabsf... yes
checking for floorf... yes
configure: error: libjpeg.(a|so) not found.

解决:
[root@goolen php-5.3.6]# ls /usr/lib64/libjpeg.so
/usr/lib64/libjpeg.so
[root@goolen php-5.3.6]# ln -s /usr/lib64/libjpeg.so /usr/lib/libjpeg.so

重新编译报另外一个错:
configure: error: libpng.(a|so) not found.

解决:
[root@goolen php-5.3.6]# ln -s /usr/lib64/libpng.so /usr/lib/libpng.so

重新编译报错:
checking for location of ICU headers and libraries... not found
configure: error: Unable to detect ICU prefix or no failed. Please verify ICU install prefix and make sure icu-config works.

解决:
[root@goolen php-5.3.6]# yum install -y libicu-devel
Loaded plugins: product-id, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Install Process
Nothing to do

[root@goolen goolen]# ls libicu-devel-4.2.1-9.1.el6_2.x86_64.rpm 
libicu-devel-4.2.1-9.1.el6_2.x86_64.rpm

[root@goolen goolen]# rpm -ivh libicu-devel-4.2.1-9.1.el6_2.x86_64.rpm 
warning: libicu-devel-4.2.1-9.1.el6_2.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing...                ########################################### [100%]
   1:libicu-devel           ########################################### [100%]

编译报错:
configure: error: mcrypt.h not found. Please reinstall libmcrypt.

解决:
[root@goolen goolen]# rpm -ivh libmcrypt-2.5.8-119.1.x86_64.rpm 
warning: libmcrypt-2.5.8-119.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 3dbdc284: NOKEY
error: Failed dependencies:
        libc.so.6(GLIBC_2.14)(64bit) is needed by libmcrypt-2.5.8-119.1.x86_64
[root@goolen goolen]# yum install -y glibc
Loaded plugins: product-id, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Install Process
Package glibc-2.12-1.80.el6.x86_64 already installed and latest version
Nothing to do
[root@goolen goolen]# rpm -ivh libmcrypt-2.5.8-119.1.x86_64.rpm --force
warning: libmcrypt-2.5.8-119.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 3dbdc284: NOKEY
error: Failed dependencies:
        libc.so.6(GLIBC_2.14)(64bit) is needed by libmcrypt-2.5.8-119.1.x86_64
[root@goolen goolen]# rpm -ivh libmcrypt-2.5.8-119.1.x86_64.rpm --force --nodeps
warning: libmcrypt-2.5.8-119.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 3dbdc284: NOKEY
Preparing...                ########################################### [100%]
   1:libmcrypt              ########################################### [100%]

[root@goolen goolen]# rpm -ivh libmcrypt-devel-2.5.8-119.1.x86_64.rpm 
warning: libmcrypt-devel-2.5.8-119.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 3dbdc284: NOKEY
Preparing...                ########################################### [100%]
   1:libmcrypt-devel        ########################################### [100%]

重新编译报错:
checking for libmcrypt version... >= 2.5.6
checking for mcrypt_module_open in -lmcrypt... no
checking for mcrypt_module_open in -lmcrypt... no
configure: error: Sorry, I was not able to diagnose which libmcrypt version you have installed.

解决:卸载2.5.8版本,换2.5.7版本
[root@goolen goolen]# rpm -e libmcrypt
error: Failed dependencies:
        libmcrypt = 2.5.8 is needed by (installed) libmcrypt-devel-2.5.8-119.1.x86_64
[root@goolen goolen]# rpm -e libmcrypt libmcrypt-devel

[root@goolen goolen]# rpm -ivh libmcrypt-2.5.7-5.el5.x86_64.rpm libmcrypt-devel-2.5.7-5.el4.x86_64.rpm --nodeps
warning: libmcrypt-2.5.7-5.el5.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 217521f6: NOKEY
Preparing...                ########################################### [100%]
   1:libmcrypt-devel        ########################################### [ 50%]
   2:libmcrypt              ########################################### [100%]


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23249684/viewspace-1478588/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/23249684/viewspace-1478588/

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值