以扩展的mysql.so的形式安装

 

2、找不到header file之类的

要yum install mysql-devel

 find / -name mysql.h
/usr/include/mysql/mysql.h

查找到mysql.h文件,我们更改参数为--with-mysql=/usr,

如果没有的话,请安装mysql-devel包,

yum install mysql-devel

重新运行编译命令

 

3、要做软链接把mariadb的lib里的18(我是18)那个软连接过去

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

今天在64位centos5.6系统上编译PHP5.2.17报错

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]# 

 

经查,问题是64位系统中 libmysqlclient 默认安装到了 /usr/lib64/mysql/ 目录下

而/usr/lib 目录下没有相应文件,但是php编译时,要去 /usr/lib目录下查找

 

解决方法:

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

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
  • 2022-12-23
  • 2022-12-23
  • 2021-11-05
  • 2021-09-14
  • 2021-11-16
猜你喜欢
  • 2022-12-23
  • 2021-06-11
  • 2022-12-23
  • 2021-11-30
  • 2021-10-27
  • 2022-12-23
  • 2021-06-12
相关资源
相似解决方案