在編譯安裝php服務時報錯: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!mysql
緣由是64位系統中 libmysqlclient 默認安裝到了 /usr/lib64/mysql/ 目錄下,而/usr/lib 目錄下沒有相應文件,可是php編譯時,要去 /usr/lib目錄下查找linux
解決方法:nginx
[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.