VPS侦探论坛

 找回密码
 注册
查看: 3246|回复: 4

重启PHP 时发生错误

[复制链接]
发表于 2019-12-9 16:27:30 | 显示全部楼层 |阅读模式

你好,老大
当我使用LNMP restart 重启时,PHP 发生错误
Stoping LNMP...
Stoping nginx...  done
[ ok ] Stopping mysql (via systemctl): mysql.service.
Gracefully shutting down php-fpm /etc/init.d/php-fpm: 82: kill: No such process

................................... failed. Use force-quit
Starting LNMP...
Starting nginx...  done
[ ok ] Starting mysql (via systemctl): mysql.service.
Starting php-fpm /usr/local/php/sbin/php-fpm: error while loading shared libraries: libharfbuzz.so.0: cannot open shared object file: No such file or directory
failed


然后我使用 php -v时:
php -v
PHP Warning:  PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/lib/php/20180731/gd.so (libharfbuzz.so.0: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/gd.so.so (/usr/lib/php/20180731/gd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/lib/php/20180731/imagick.so (libharfbuzz.so.0: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/imagick.so.so (/usr/lib/php/20180731/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 7.3.12-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Nov 28 2019 07:37:16) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.12, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.12-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

求求大佬指点迷津
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2019-12-9 19:39:53 | 显示全部楼层


Starting php-fpm /usr/local/php/sbin/php-fpm: error while loading shared libraries: libharfbuzz.so.0: cannot open shared object file: No such file or directory
这个应该是你资金不注意把这个依赖包卸载掉了,apt-get或yum再安装libharfbuzz-dev或harfbuzz-devel包

php -v显示的不是lnmp的php,是你自己通过apt-get安装的,使用apt-get卸载掉
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2019-12-9 22:32:53 | 显示全部楼层

licess 发表于 2019-12-9 19:39
Starting php-fpm /usr/local/php/sbin/php-fpm: error while loading shared libraries: libharfbuzz.so.0 ...

按照大佬的方案 再次重启 又发现新问题:
Stoping LNMP...
Stoping nginx...  done
[ ok ] Stopping mysql (via systemctl): mysql.service.
Gracefully shutting down php-fpm warning, no pid file found - php-fpm is not running ?
Starting LNMP...
Starting nginx...  done
[ ok ] Starting mysql (via systemctl): mysql.service.
Starting php-fpm [09-Dec-2019 22:29:39] ERROR: Another FPM instance seems to already listen on /tmp/php-cgi.sock
[09-Dec-2019 22:29:39] ERROR: FPM initialization failed
failed
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2019-12-10 09:23:09 | 显示全部楼层



superx2004 发表于 2019-12-9 22:32
按照大佬的方案 再次重启 又发现新问题:
Stoping LNMP...
Stoping nginx...  done

之前php-fpm异常关闭,导致无法通过pid关闭,只能使用kill或killall命令将之前的php-fpm进程杀死
最简单的方法 lnmp kill 然后 lnmp start 或简单粗暴的重启系统
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2019-12-16 09:00:27 | 显示全部楼层

licess 发表于 2019-12-10 09:23
之前php-fpm异常关闭,导致无法通过pid关闭,只能使用kill或killall命令将之前的php-fpm进程杀死
最简单 ...

已经解决了,谢谢大佬!非常感谢!

军哥运维代购:http://shop63846532.taobao.com/

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-11-20 19:42 , Processed in 0.026690 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表