When compiling and installing the mariadb and php52 source code installed by centos-rpm

0. Do not statically specify with-mysql

Installed as an extended mysql.so

 

1\

To yum install mysql-devel

 

2\To make a soft link, connect the soft link of 18 to the past

 

解决configure: error: Cannot find libmysqlclient under /usr.

Reprinted  on June 17, 2014 18:33:59

Compiling PHP5.2.17 on a 64-bit centos5.6 system reported an error today

checking for MySQL support... yes, shared
checking for specified location of the MySQL UNIX socket... no
checking for the location of libz... no
checking for MySQL UNIX socket location... /var/lib/mysql/mysql.sock
configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!
[root@zjlca mysql]#

 

After investigation, the problem is that libmysqlclient is installed in the /usr/lib64/mysql/ directory by default in 64-bit systems

There is no corresponding file in the /usr/lib directory, but when php is compiled, it must be searched in the /usr/lib directory

 

Solution:

ln -s /usr/lib64/mysql/libmysqlclient.so.15.0.0/usr/lib/libmysqlclient.so

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324889036&siteId=291194637