手记

centos6.8 启动php-fpm报错

今日重启php-fpm重启不了 ,报错信息如下:

[root@su ~]# /etc/init.d/php-fpm start
Starting php-fpm /usr/local/php/sbin/php-fpm: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory
 failed
解决方法:

[root@su~]# find  / -name 'libmysqlclient.so.18'
/usr/local/webserver/mysql56/lib/libmysqlclient.so.18

进入到/usr/lib64目录下是否有该文件软链接

[root@su lib64]# ls libmysqlclient.so.18
ls: cannot access libmysqlclient.so.18: No such file or directory -不存在

重新软连接:

[root@su  ~]# ln -s /usr/local/webserver/mysql56/lib/libmysqlclient.so.18  /usr/lib64/

[root@su ~]# /etc/init.d/php-fpm start
Starting php-fpm  done
就OK了 。

0人推荐
随时随地看视频
慕课网APP