Compiling PHP times incorrectly during Linux installation

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.