superx2004 发表于 2019-12-9 16:27:30

重启PHP 时发生错误

你好,老大
当我使用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

求求大佬指点迷津

licess 发表于 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卸载掉

superx2004 发表于 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 ERROR: Another FPM instance seems to already listen on /tmp/php-cgi.sock
ERROR: FPM initialization failed
failed
:L

licess 发表于 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 或简单粗暴的重启系统

superx2004 发表于 2019-12-16 09:00:27

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

已经解决了,谢谢大佬!非常感谢!
页: [1]
查看完整版本: 重启PHP 时发生错误