关于启动php-fpm失败的解决办法

当我执行 sudo lnmp php-fpm restart会出现如下错误

Starting php-fpm /usr/local/php/sbin/php-fpm: error while loading shared libraries: libmcrypt.so.4: cannot open shared object file: No such file or directory  failed

而libmcrypt.so.4是存在的,在usr/local/lib里,网上说的解决办法是在/etc/ld.so.conf中加入/usr/local/lib這一行,

然后我打开ld.so.conf这个文件,里面已经加载了。

==========================

然后我试着kill php-fpm

然后再重启

sudo lnmp php-fpm kill

sudo /etc/init.d/php-fpm start

然后php-fpm就启动成功了,再访问根目录的php文件就可以访问到了

原文地址:https://www.cnblogs.com/chiruno/p/6484384.html