[root@cac3 php-5.6.22]# ./configure \
> --prefix=/usr/local/php5/ \
> - -enable-fpm \
> --enable-mbstring \
> --enable-bcmath \
> --enable-sockets \
> --with-config-file -path=/usr/local/php5/etc \
> --with-mysql=/usr/local/mysql/ \
> --with-mysqli=/usr/local/mysql/bin /mysql_con
mysql_config mysql_convert_table_format
mysql_config_editor mysql_convert_table_format
mysql_config -with-gettext \
> --with-jpeg-dir
configure: error: jpeglib.h not found.
[root@cac3 php-5.6 .22]# rpm -qa | grep libjpeg
libjpeg-turbo-1.2.90-5.el7.x86_64[root@cac3 php-5.6.22]# yum -y install libjpeg-devel
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Resolving dependencies
--> Checking transaction
---> Package libjpeg-turbo-devel.x86_64.0.1.2.90-5.el7 will be installed
......
[root@cac3 php-5.6.22]# yum list installed | grep libjpeg
libjpeg-turbo.x86_64 1.2.90-5.el7 1.2.90- 5.el7 @yaya
[root@cac3 php-5.6.22]# rpm -ql libjpeg-turbo
/usr/lib64/libjpeg.so.62
/usr/lib64/libjpeg.so.62.1.0/usr/share/doc/libjpeg-turbo-1.2.90/usr/share/doc/libjpeg-turbo-1.2.90/ChangeLog. txt
/usr/share/doc/libjpeg-turbo-1.2.90/README
/usr/share/doc/libjpeg-turbo-1.2.90/README-turbo.txt
/usr/share /doc/libjpeg-turbo-1.2.90/change.log
/usr/lib/libjpeg.so.62
/usr/lib/libjpeg.so.62.1.0
/usr/share/ doc/libjpeg-turbo-1.2.90
/usr/share/doc/libjpeg-turbo-1.2.90/ChangeLog.txt
/usr/share/doc/libjpeg-turbo-1.2.90/README
/usr/share/doc/libjpeg-turbo-1.2.90/README-turbo.txt
##/usr/share/doc/libjpeg-turbo-1.2. 90/change.log
#Compile again and it will be successful.
Related recommendations:
How to add openssl module to php without recompiling PHP
After compiling php7, how to make apache support php7
The above is the detailed content of An error occurs when compiling PHP during Linux installation. For more information, please follow other related articles on the PHP Chinese website!