Today in the building Lnmp compiled PHP, error: Configure:error:jpeglib.h not found. This article will share with you how to solve this kind of problem.
[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
>--with-mysqli=/usr/local/mysql/bin/mysql_config \
>--WITH-GD \
>--with-gettext \
>--with-jpeg-dir
The following error occurred after executing the above command:
Configure:error:jpeglib.h not found.
The solution is as follows:
[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 a registered with an entitlement server. You can use the Subscription-manager to register.
Resolving dependencies
--Checking transactions
---> Package libjpeg-turbo-devel.x86_64.0.1.2.90-5.el7 will be installed
--Resolve dependency completion
......
[Root@cac3 php-5.6.22]# Yum List installed | grep libjpeg
libjpeg-turbo.x86_64 1.2.90-5.el7 @anaconda/7.4
libjpeg-turbo-devel.x86_64 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 to succeed.
Related recommendations:
Do not recompile php add OpenSSL module to PHP method
Compiling PHP Notes
After compiling PHP7, how to let Apache support PHP7