.sh没有这样的文件或目录,文件确实存在

发布于 2025-02-11 01:07:34 字数 703 浏览 1 评论 0原文

文件存在,我在相对路径脚本/start_app.sh中看到了它。我在顶部的shebang正确。我正在使用Ubuntu 22.04,并且我已经通过运行:

sudo dpkg -add-Archituction i386

sudo apt-apt-get install libc6:i386 libncurses5:i386 libstdc ++ 6:i386 i386

./start_app.sh在终端中仍然产生:“没有这样的文件或目录”,

我尝试dos2unix。无法使用:

$ dos2unix start_app.sh

dos2unix:start_app.sh:no这样的文件或目录

dos2unix:skipping start_app.sh,而不是常规文件。

有人可以帮我吗?

(我的.sh文件)

#!/bin/bash
python manage.py runserver 0.0.0.0:8000

vscode screenshot

The file exists, I see it in the relative path scripts/start_app.sh. I have the shebang correct at the top. I'm using Ubuntu 22.04 and I've updated the packages by running:

sudo dpkg --add-architecture i386

sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386

./start_app.sh in terminal still yields: "No such file or directory"

I try to dos2unix the file. Doesn't work:

$dos2unix start_app.sh

dos2unix: start_app.sh: No such file or directory

dos2unix: Skipping start_app.sh, not a regular file.

Can someone help me with this?

(my .sh file)

#!/bin/bash
python manage.py runserver 0.0.0.0:8000

vscode screenshot

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

橘香 2025-02-18 01:07:34

我怀疑该文件可能会损坏。

尝试运行一些命令进行故障排除:

$file start_app.sh
$ls -l start_app.sh
$stat start_app.sh

请发布结果。

I suspect the file could be corrupted.

Try to run a few commands for troubleshooting:

$file start_app.sh
$ls -l start_app.sh
$stat start_app.sh

Please post the results.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文