PHP compile-time prompt libjpeg. (A|SO) not found (JPEG library not found)

Source: Internet
Author: User

./configure--prefix=/usr/local/php--with-config-file-path=/usr/local/php/etc--with-apxs2=/usr/local/apache2/ Bin/apxs--with-mysql=/mysql/mysql--with-mysqli=/mysql/mysql/bin/mysql_config--with-iconv-dir=/usr/local-- With-freetype-dir--with-jpeg-dir--with-png-dir--with-zlib--with-gd--with-libxml-dir

Look for Find/-name libjpeg.so found in the root directory the library file does exist

/usr/lib64/libjpeg.so

Most of the solutions offered online are:

Ln-s/usr/lib64/libjpeg*/usr/lib/

The library file is pointed to the Lib directory by means of a soft link. But this increase in the number of links does not say that also leads to subsequent maintenance trouble.

Including the follow-up for PHP to add gd,libpng and so on need to do similar operations, it is troublesome, thinking found, why like--with-gd such parameters even if the specified/usr/lib64 such a clear path, the compilation process will still find Lib library? The contents of the compiled file are too many to view, and then to see if there are parameters to specify the path of the dynamic library?

Carefully read the following configure's compilation parameters found:

--with-libdir=name look for libraries in .../name rather than .../lib

Explains that locating a library file under the specified name supersedes Lib

OK, found the parameters, after trying several times, found that in fact, as long as the specified --with-libdir=/lib64 can be successfully compiled.

In addition: If you compile PHP to specify the MySQL path problem, because previously specified lib64 caused the following error cannot find Libmysqlclient_r under/mysql. So I ln-s/mysql/mysql/lib/mysql/mysql/lib64.

Another problem is that I started MySQL a soft link directly to the root directory, the results of the compilation found his path is/mysql/mysql, really irritating, in order to solve this problem repeatedly compiled, finally had to put the source package link to/mysql under the formation of/mysql/ This path to MySQL solves the problem.

This article is from the "linuxoracle" blog, make sure to keep this source http://onlinekof2001.blog.51cto.com/3106724/1585214

PHP compile-time prompt libjpeg. (A|SO) not found (JPEG library not found)

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.