gpt4 book ai didi

ubuntu - 打开二进制文件 : does not exist (No such file or directory) when using shellcheck

转载 作者:行者123 更新时间:2023-12-04 18:25:34 24 4
gpt4 key购买 nike

我在用于 shellcheck 的 Ubuntu 18.04.4 LTS 上看到了这个问题:

$ ls -l /data/myscript
-rwxr-xr-x 1 user 1300000013 4200 Aug 25 13:13 /data/myscript
$ shellcheck /data/myscript
/data/myscript: /data/myscript: openBinaryFile: does not exist (No such file or directory)

为什么会出错?

最佳答案

我通过查看 https://github.com/koalaman/shellcheck/issues/1356 找到了答案

在我的案例中,问题是 snap 阻止了对 /data 的访问(snap 沙箱,因此它无法访问家庭以外的文件和/media),很简单:

mv /data/myscript ~  # Move the script to homedir
shellcheck ~/myscript

使shellcheck正常工作。

关于ubuntu - 打开二进制文件 : does not exist (No such file or directory) when using shellcheck,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63589562/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com