bash 打开时终端显示“没有这样的文件或目录”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30373336/
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
Terminal says 'No such file or directory' when open
提问by Alan
In the last couple of days my terminal has been saying
在过去的几天里,我的终端一直在说
-bash: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin: No such file or directory
-bash: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin: No such file or directory
However, all of the above do exist. I was playing around with $PATH
variable last week but the error I am now getting appeared days after I stopped playing with the $PATH
variable.
但是,上述所有情况确实存在。$PATH
上周我一直在玩变量,但是在我停止玩$PATH
变量几天后,我现在遇到的错误出现了。
Here are the contents of my .bash_profile that I was playing about with too:
以下是我也在玩的 .bash_profile 的内容:
采纳答案by Etan Reisner
The first line of your .bash_profile
is the problem.
你的第一行.bash_profile
是问题所在。
That line is attempting to run /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin
as a command which causes the error you see when you start the shell.
该行试图/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin
作为命令运行,这会导致您在启动 shell 时看到的错误。
Remove that line and the error should go away.
删除该行,错误应该消失。