PHP

PHP编译安装报Cannot find libmysqlclient under /usr错误

源码编译php5.3.6,在编译的那一步最后总是报如下错误:configure: error: Cannot find libmysqlclient under /usr. Note that the MySQL client library is not bundled anymore!编译参数如下:# ./configure --prefix=/usr/local/php5.3.6 --with-apxs2=/usr/local/apache2/bin/apxs --enable-mbstring --with-curl --with-openssl --with-zlib --enable-sockets --enable-ftp --with-mysql --with-openssl --with-gd --with-png-dir --with-jpeg-dir --with-freetype-dir --enable-sockets --enable-pcntl --with-mhash --with-mcrypt --enable-bcmath --with-gettext --enable-zip --with-pdo-mysql
已邀请:

Ansible - 项目实施 系统工程师

赞同来自: koyo

在执行编译之前,执行这么一句命令:
cp /usr/lib64/mysql/libmysqlclient.so.15.0.0 /usr/lib/libmysqlclient.so

##libmysqlclient的版本号看安装的是哪个,就拷贝哪个PHP 默认是去 /usr/lib/ 搜索 libmysqlclient.so 这个文件,搜不到就报那个错误。cp 一个过去就行了。

要回复问题请先登录注册