在编译安装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.