【问题标题】:MAC 10.10 Yosemite - Terminal: - bash: [SomeCommand] command not found?MAC 10.10 Yosemite - 终端: - bash:找不到 [SomeCommand] 命令?
【发布时间】:2014-12-29 17:58:52
【问题描述】:

我不知道为什么,但是当我在终端中编写任何命令时。它总是告诉我 -bash:[SomeCommand] command not found。我不知道这是否与我的路径有关 -bash: /user/local/php5/bin:/user/local/mysql/bin: 没有这样的文件或目录或其他任何东西。这是我第一次使用终端,我不知道发生了什么。

【问题讨论】:

  • 如果您没有得到@MichaelM 的建议,请在TextEdit 中打开文件~/.profile 并在底部export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/user/local/php5/bin:/user/local/mysql/bin 附近添加这样的一行,这就是一行。然后启动一个新的终端并重试。
  • 当我尝试打开文件时:open -a TextEdit .profile -> 文件/Users/sothearavychan/.profile 不存在。
  • 您可能正在使用~/.bash_profile 或~/.bash_login
  • 或者您的 PATH 可以为所有用户设置在/etc/profile。
  • 非常感谢!有用。 :D

标签: bash terminal osx-yosemite


【解决方案1】:

您缺少常规的 bin 目录。这是我的 $PATH 在新的 Yosemite 上的样子:

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-06-23
    • 2016-04-11
    • 1970-01-01
    • 1970-01-01
    • 2011-07-16
    • 2021-05-05
    • 1970-01-01
    相关资源
    最近更新 更多