编译安装php服务报错问题:configure: error: Cannot find libmysqlclient under /usr.
Posted su-root
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了编译安装php服务报错问题:configure: error: Cannot find libmysqlclient under /usr.相关的知识,希望对你有一定的参考价值。
在编译安装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.的主要内容,如果未能解决你的问题,请参考以下文章
PHP编译安装报错:configure: error: mcrypt.h not found. Please reinstall libmcrypt
解决php编译报错configure: error: mcrypt.h not found. Please reinstall libmcrypt.
安装iamp模块,编译报错configure: error: Cannot find imap library (libc-client.a). Please check your c-client
php5.6.11编译安装报错configure: error: Don't know how to define struct flock on this system