这开始于我尝试安装自制软件时。我对这一切都很陌生,所以如果我没有用正确的词汇解释这一点,我提前道歉。
我最初跑brew doctor
并得到了command not found
. 在搜索了一些论坛并更改了 $PATH 之后,我至少达到brew doctor
了警告我删除 $PATH 的一部分的地步。不幸的是,我不记得究竟是哪一部分——以“/opt”开头的东西。
我删除了一些 $PATH 但现在无法运行基本命令,例如:
Tays-MacBook-Pro:~ taytufenkjian$ irb
-bash: irb: command not found
Tays-MacBook-Pro:~ taytufenkjian$ open ~/.bash_profile
-bash: open: command not found
现在我的 brew doctor 尝试如下所示:
Tays-MacBook-Pro:~ taytufenkjian$ brew doctor
/usr/local/bin/brew: line 2: dirname: command not found
/usr/local/bin/brew: line 5: basename: command not found
/usr/local/bin/brew: line 8: readlink: command not found
/usr/local/bin/brew: line 16: cd: /Users/taytufenkjian/../Library: No such file or directory
/usr/local/bin/brew: line 18: uname: command not found
/usr/local/bin/brew: line 18: tr: command not found
/usr/local/bin/brew: line 23: exec: ruby: not found
我以为我会尝试重置我的 $PATH 但我一直尝试的命令给了我“找不到命令”的消息。
$PATH 详细信息:
Tays-MacBook-Pro:~ taytufenkjian$ echo $PATH
/usr/local/bin:/usr/local/bin:/usr/local/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/bin:/usr/local/bin:/Users/taytufenkjian/
我已经在这里待了几个小时,我很困惑。我正在尝试为几天后开始的课程设置我的环境。