码迷,mamicode.com
首页 > 数据库 > 详细

编译安装php服务报错问题:configure: error: Cannot find libmysqlclient under /usr.

时间:2019-08-17 23:43:27      阅读:152      评论:0      收藏:0      [点我收藏+]

标签:cti   roc   服务   ttf   RoCE   safe   bic   configure   inux   

在编译安装php服务时报错:

checking for MSSQL support via FreeTDS... no
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!

 

原因是64位系统中 libmysqlclient 默认安装到了 /usr/lib64/mysql/ 目录下,而/usr/lib 目录下没有相应文件,但是php编译时,要去 /usr/lib目录下查找

解决方法:

[root@web1 php-5.3.27]# ln -s /usr/lib64/mysql/libmysqlclient.so.16.0.0 /usr/lib/libmysqlclient.so
[root@web1 php-5.3.27]# rm -rf /application/mysql
[root@web1 php-5.3.27]# ./configure --prefix=/application/php-5.3.27 --with-mysql --with-iconv-dir=/usr/local/libicon
v --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curlwrappers --enable-mbregex --enable-mbstring --enable-fpm --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --enable-short-tags --enable-zend-multibyte --enable-static --with-xsl --with-fpm-user=nginx --with-fpm-group=nginx --enable-ftploading cache ./config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu

...此处省略....

creating main/internal_functions.c
creating main/internal_functions_cli.c
+--------------------------------------------------------------------+
| License:                                                           |
| This software is subject to the PHP License, available in this     |
| distribution in the file LICENSE.  By continuing this installation |
| process, you are bound by the terms of this license agreement.     |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point.                            |
+--------------------------------------------------------------------+

Thank you for using PHP.

编译安装php服务报错问题:configure: error: Cannot find libmysqlclient under /usr.

标签:cti   roc   服务   ttf   RoCE   safe   bic   configure   inux   

原文地址:https://www.cnblogs.com/su-root/p/11370887.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!