how to 解决lnmp1.5 Can’t get stack info 错误

本想使用lnmp1.4的./upgrade.sh php命令升级php,结果无法升级,错误信息如下:

cp: cannot stat ‘/root/lnmp1.4/src/php-5.6.20/sapi/fpm/init.d.php-fpm’: No such
file or directory
chmod: cannot access ‘/etc/init.d/php-fpm’: No such file or directory
+——————————————-+
| Manager for LNMP, Written by Licess |
+——————————————-+
| https://lnmp.org |
+——————————————-+
Starting LNMP…
Starting nginx… done
Starting mysql (via systemctl): mysql.service.
/bin/lnmp: line 27: /etc/init.d/php-fpm: No such file or directory
^[[0;31m======== upgrade php failed ======^[[0m
^[[0;31mupgrade php log: /root/upgrade_lnmp_php.log^[[0m
You upload upgrade_lnmp_php.log to LNMP Forum for help.

手动解压php-5.6.20后,再执行此命令是发现解压的文件夹被删除了,还是出现相同的错误。

于是就想更新lnmp版本。选用lnmp1.5, 在解压后的lnmp1.5文件夹中执行./upgrade1.x-1.5.sh (1.x版本的话在1.5安装包目录下 ./upgrade1.x-1.5.sh 可进行升级lnmp管理脚本及大部分功能,可以使用lnmp 1.5的新功能。除Nginx、PHP、MySQL版本外功能基本都能正常使用,Nginx、PHP可以通过升级脚本进行升级、MySQL只要没问题不建议进行升级。),出现错误Can’t get stack info error。

定位到include/main.sh 发现Check_Stack函数中判断/usr/local/php/sbin/php-fpm,而服务器中虽然有/usr/local/php/文件夹,却根本没有/usr/local/php/sbin文件夹。

强行把Get_Stack=”unknow” 改为Get_Stack=”lnmp”后,再次执行/upgrade1.x-1.5.sh 成功。发现php程序的网站无法访问,使用./upgrade.sh php更新php版本后,网站恢复正常。此时也有/usr/local/php/sbin文件夹和/usr/local/php/sbin/php-fpm文件了。

发表评论

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据