./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)