configure: error: Cannot find libmysqlclient under /usr.

谁借莪1个温暖的怀抱¢ 2022-01-10 12:23 374阅读 0赞

checking for 8-bit clean memcmp… yes

checking for mcrypt support… no

checking for mhash support… no

checking whether to include mime_magic support… no

checking for MING support… no

checking for mSQL support… no

checking for MSSQL support via FreeTDS… no

checking for MySQL support… yes

checking for specified location of the MySQL UNIX socket… no

checking for MySQL UNIX socket location… no
configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!

通过查找libmysqlclient是在/usr/lib64/目录内的libmysqlclient.so.18.做的软连接,php默认的搜索路径是/usr/lib/搜索.
解决办法:

如果mysql目录没有,需要创建,再把/usr/lib64/目录下的libmysqlclient.so libmysqlclient.so.18 libmysqlclient.so.18.1.0复制到 /usr/lib/mysql文件夹中

[root@localhost ~]# mkdir /usr/lib/mysql

[root@localhost ~]# cd /usr/lib64

[root@localhost lib64]# cp libmysqlclient.* /usr/lib/mysql

[root@localhost lib64]#

进入php-5.2.9目录./configure即可

[root@localhost ~]# cd /usr/src/php-5.2.9
[root@localhost php-5.2.9]# ./configure —prefix=/usr/local/php —with-apxs2=/usr/local/apache/bin/apxs —with-mysql=/usr/local/mysql/ —with-libxml-dir —enable-mbstring

转载于:https://blog.51cto.com/8656934/1713000

发表评论

表情:
评论列表 (有 0 条评论,374人围观)

还没有评论,来说两句吧...

相关阅读