运行 shell 脚本 cannot execute: required file not found 错误

Linux系统5个月前发布 gyx131
207 0 0

出现 cannot execute: required file not found 错误,可能与脚本的编码格式(尤其是换行符)或文件格式有关,而非传统意义上的字符编码(如 UTF-8)问题。以下是具体解决步骤:

解决方法:

使用 dos2unix 工具转换换行符(若未安装,先安装):
# 安装 dos2unix(Debian/Ubuntu 系统)
sudo apt-get install dos2unix

# 转换脚本换行符为 LF
dos2unix test.sh
# 运行脚本给权限
chmod +x frp.sh

# 运行脚本
./test.sh
© 版权声明

相关文章

暂无评论

暂无评论...