VPS侦探论坛

 找回密码
 注册
查看: 644|回复: 3

lnmp1.9 upgrade.sh 提示文件不存,但文件是存在的

[复制链接]
发表于 2023-9-18 11:30:33 | 显示全部楼层 |阅读模式

本帖最后由 boys1999 于 2023-9-18 11:32 编辑

一年前安装的,今天想安装个nginx第三方模块,执行更新时都是提示文件不引入

我的 lnmp 目录有点奇怪
在 /root/lnmp1.9 里面还有一个一模一样的/root/lnmp1.9/lnmp1.9/,所有文件和目录和外面一样

在我执行下面命令时,发现有这个: /root/lnmp1.9/lnmp1.9/, 如下所示, 我想应该就以这个目录的为准: /root/lnmp1.9/lnmp1.9/

[root@vmi1014991 ~]# /usr/local/nginx/sbin/nginx -V
configure arguments: --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-http_sub_module --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-openssl=/root/lnmp1.9/lnmp1.9/src/openssl-1.1.1o --with-openssl-opt='enable-weak-ssl-ciphers'



执行 /root/lnmp1.9/lnmp1.9/upgrade.sh 和 /root/lnmp1.9/upgrade.sh 都是一样提示


[root@vmi1014991 ~]# /root/lnmp1.9/lnmp1.9/upgrade.sh
/root/lnmp1.9/lnmp1.9/upgrade.sh: line 15: lnmp.conf: No such file or directory
/root/lnmp1.9/lnmp1.9/upgrade.sh: line 16: include/version.sh: No such file or directory
...

[root@vmi1014991 ~]# /root/lnmp1.9/lnmp1.9/upgrade1.x-1.9.sh
/root/lnmp1.9/lnmp1.9/upgrade1.x-1.9.sh: line 13: lnmp.conf: No such file or directory
/root/lnmp1.9/lnmp1.9/upgrade1.x-1.9.sh: line 14: include/main.sh: No such file or directory
...

[root@vmi1014991 ~]# /root/lnmp1.9/upgrade1.x-1.9.sh
/root/lnmp1.9/upgrade1.x-1.9.sh: line 13: lnmp.conf: No such file or directory
/root/lnmp1.9/upgrade1.x-1.9.sh: line 14: include/main.sh: No such file or directory
...

实际上类似下面这些文件都存在的
/root/lnmp1.9/lnmp1.9/lnmp.conf
/root/lnmp1.9/lnmp1.9/include/main.sh


美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2023-9-18 11:43:24 | 显示全部楼层


\root\lnmp1.9\lnmp1.9\upgrade.sh文件内容,没动过
#!/usr/bin/env bash
export PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin

# Check if user is root
if [ $(id -u) != "0" ]; then
    echo "Error: You must be root to run this script"
    exit 1
fi

cur_dir=$(pwd)
action=$1
shopt -s extglob
Upgrade_Date=$(date +"%Y%m%d%H%M%S")

. lnmp.conf
. include/version.sh
. include/main.sh
. include/init.sh
. include/php.sh
. include/nginx.sh
. include/mysql.sh
. include/mariadb.sh
. include/upgrade_nginx.sh
. include/upgrade_php.sh
. include/upgrade_mysql.sh
. include/upgrade_mariadb.sh
. include/upgrade_mysql2mariadb.sh
. include/upgrade_phpmyadmin.sh
. include/upgrade_mphp.sh

Get_Dist_Name
Get_Dist_Version
MemTotal=`free -m | grep Mem | awk '{print  $2}'`
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2023-9-18 20:04:39 | 显示全部楼层

官网教程https://lnmp.org/faq/lnmp1-2-upgrade.html上有说明,必须要进入到安装包目录下后 ./upgrade.sh
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2023-9-19 09:13:38 | 显示全部楼层



licess 发表于 2023-9-18 20:04
官网教程https://lnmp.org/faq/lnmp1-2-upgrade.html上有说明,必须要进入到安装包目录下后 ./upgrade.sh ...

原来这样, 感谢大佬. 没弄明白shell执行的路径问题
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-4-22 02:06 , Processed in 0.026565 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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