MAC 10.10 Yosemite - 终端:- bash:找不到 [SomeCommand] 命令?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26708142/
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
MAC 10.10 Yosemite - Terminal: - bash: [SomeCommand] command not found?
提问by Schan
I dont know why but when I write any commands in my terminal. It always show me -bash:[SomeCommand] command not found. I dont know if it's about my path -bash: /user/local/php5/bin:/user/local/mysql/bin: No such file or directory or anything else. It was my first time that I use the terminal and I don't know what happened.
我不知道为什么,但是当我在终端中编写任何命令时。它总是向我显示 -bash:[SomeCommand] 命令未找到。我不知道是不是关于我的路径 -bash: /user/local/php5/bin:/user/local/mysql/bin: 没有这样的文件或目录或其他任何东西。这是我第一次使用终端,我不知道发生了什么。
回答by MichaelM
You are missing the regular bin directories. Here's what my $PATH looks like on a fresh Yosemite:
您缺少常规 bin 目录。这是我的 $PATH 在新鲜的 Yosemite 上的样子:
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin