From: phpoa
Php has not been compiled and installed for a long time. To play with nginx, You can compile it once for testing. The compilation parameters I added are:
#. /Configure-prefix =/usr/local/php-with-config-file-path =/etc-with-gd-enable-gd-native-ttf-with-mysql- -iconv-dir-with-freetype-dir-with-jpeg-dir-with-png-dir-with-zlib-with-libxml-dir-enable-xml-disable-debug -disable-rpath-enable-discard-path-enable-safe-mode-enable-bcmath-enable-shmop-enable-sysvsem-enable-inline-optimization-with-curl- -curlwrappers-enable-mbregex-enable-fastcgi-enable-force-cgi-redirect-enable-mbstring-with-mcrypt
I did not expect the following errors
Checking for mysql_close in-lmysqlclient... No
Checking for mysql_error in-lmysqlclient... No
Configure: error: mysql configure failed. Please check config. log for more information.
Google has been talking about the following answer for a long time: dizzy. This is also called the answer. I don't have to re-compile mysql. This php is very troublesome. This must be wrong.
When installing PHP, I did not specify the mysql installation directory. But I have already specified this, so this statement is incorrect. The main reason is that mysql-level is not installed, that is, the mysql version is incorrect.
Mysql-max-5.0.21 version (software packages that contain all mysql-related content)
/Usr/bin/ld: skipping incompatible/usr/lib/mysql/libmysqlclient. so when searching for-lmysqlclient
/Usr/bin/ld: skipping incompatible/usr/lib/mysql/libmysqlclient. a when searching for-lmysqlclient
/Usr/bin/ld: cannot find-lmysqlclient
Collect2: ld returned 1 exit status
Configure: failed program was:
# Line 59854 "configure"
# Include "confdefs. h"
Check the error message in config. log .... Oh. It turns out that there is a problem with the version. I think my system is X86, and lib is 64-bit. So the solution is very easy.
This libmysqlclient. a library is in/usr/lib64/mysql, not in/usr/lib/mysql.
So we can do the following to solve the problem:
# Export LDFLAGS =-L/usr/lib64/mysql
OR
In Makefile
-L/usr/lib/mysql
Change
-L/usr/lib64/mysql