经常在安装 php 5.4 的时候出现以下错误:
checking for MySQL UNIX socket location... no
configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!
解决方法:
#mysql_config
查看mysql 的安装目录 例如找出mysql安装在/usr/loca/mysql
#cd /usr/local/mysql/mysql/
#ln -s libmysqlclient.so.15.0.0 libmysqlclient_r.so
返回php-5.4目录
#./configure --prefix=/usr/local/php5 --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-apxs2=/usr/local/apache2/bin/apxs --with-gd=/usr/local/modules/gd --with-jpeg-dir=/usr/local/jpeg --with-zlib-dir=/usr --with-png-dir=/usr --with-freetype-dir=/usr/local/freetype --with-xmlrpc --enable-force-cgi-redirect --enable-calendar --enable-dba --enable-sockets --enable-mbstring=all
#make
#make install
阅读(2633) | 评论(0) | 转发(0) |