首页 > 代码库 > php: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No

php: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No

解决方法:

1、进入mysql安装目录查看,确认有libmysqlclient.so.16.0.0 文件, 于是需要在/usr/lib目录下建立一个软链接来指向libmysqlclient.so.16

2、在php lib目录下下建立个软链接:(格式为:ln -s mysql lib路径  php lib路径)

ln -s /home/openpf/app/mysql-5.1.56-2/lib/mysql/libmysqlclient.so.16  /home/openpf/app/php-5.3.3/lib/php/extensions/no-debug-non-zts-20090626/libmysqlclient.so



php: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No