PHP编译报错error: libjpeg.(a
编译PHP时报错: # ./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.
解决:
# ls /usr/lib64/libjpeg.so
/usr/lib64/libjpeg.so
# ln -s /usr/lib64/libjpeg.so /usr/lib/libjpeg.so
重新编译报另外一个错:
configure: error: libpng.(a|so) not found.
解决:
# 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.
解决:
# yum install -y libicu-devel
Loaded plugins: product-id, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer> Setting up Install Process
Nothing to do
# 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
# 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> Preparing... ###########################################
1:libicu-devel ###########################################
编译报错:
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
解决:
# 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> error: Failed dependencies:
libc.so.6(GLIBC_2.14)(64bit) is needed by libmcrypt-2.5.8-119.1.x86_64
# yum install -y glibc
Loaded plugins: product-id, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer> Setting up Install Process
Package glibc-2.12-1.80.el6.x86_64 already installed and latest version
Nothing to do
# 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> error: Failed dependencies:
libc.so.6(GLIBC_2.14)(64bit) is needed by libmcrypt-2.5.8-119.1.x86_64
# 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> Preparing... ###########################################
1:libmcrypt ###########################################
# 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> Preparing... ###########################################
1:libmcrypt-devel ###########################################
重新编译报错:
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版本
# rpm -e libmcrypt
error: Failed dependencies:
libmcrypt = 2.5.8 is needed by (installed) libmcrypt-devel-2.5.8-119.1.x86_64
# rpm -e libmcrypt libmcrypt-devel
# 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> Preparing... ###########################################
1:libmcrypt-devel ########################################### [ 50%]
2:libmcrypt ###########################################
页:
[1]