bash ls: 没有那个文件或目录

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31234117/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 13:17:36  来源:igfitidea点击:

ls: No such file or directory

bashunixcommand-linels

提问by user3063666

I have been messing around trying to install macvim to a higher version of 7.4. I finally got it working but now I get the error

我一直在尝试将 macvim 安装到 7.4 的更高版本。我终于让它工作了,但现在我得到了错误

ls: No such file or directory

when looking for a directory. I can temporarily fix it by using the command

在查找目录时。我可以使用命令临时修复它

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

however, as soon as I exit my terminal window the problem returns. How do I fix this permanently.

但是,一旦我退出终端窗口,问题就会回来。我如何永久解决这个问题。

回答by mousumis

You should add the following to your ~/.bash_profile file so the PATH is loaded every time you log in:

您应该将以下内容添加到您的 ~/.bash_profile 文件中,以便在您每次登录时加载 PATH:

export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin