我正在尝试使用以下脚本在运行OSX 10.10.5的Mac上安装Homebrew ...
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
...但是在终端中收到以下错误:
/usr/local/Library/ENV/scm/git: line 10: /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby: No such file or directory
/usr/local/Library/ENV/scm/git: line 10: exec: /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby: cannot execute: No such file or directory
/usr/local/Library/ENV/scm/git: line 10: /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby: No such file or directory
/usr/local/Library/ENV/scm/git: line 10: exec: /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby: cannot execute: No such file or directory
/usr/local/Library/brew.sh: line 250: /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby: No such file or directory
/usr/local/Library/brew.sh: line 250: exec: /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby: cannot execute: No such file or directory
Failed during: /usr/local/bin/brew tap homebrew/core
运行任何brew
命令后也会出现此错误。
我可以运行Ruby 2.0.0p481,并安装了Xcode Version 7.2.1(7C1002),这是我可以使用的最新版本。我也可以使用这个脚本卸载Homebrew,没有错误:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
最初,我认为这是一个权限问题,所以试过......
sudo chown -R $(whoami) /usr/local
......没有成功。
然后我搜索了错误中提到的路径。 当前显示为别名,当我尝试打开它时,我收到以下错误:
The operation can’t be completed because the original item for “Current” can’t be found.
我可以通过Finder导航到/usr/bin/Ruby
路径,但不确定这是否与错误中的路径有关。
我不相信我已经触及Ruby安装,所以我不确定为什么会出错。
终端现在在打开终端窗口时显示以下内容:
-bash: rbenv: command not found
-bash: rbenv: command not found
-bash: rbenv: command not found
我的最终目标是在运行OSX 10.10.5的Mac上编译并安装Tiled Map Editor。我以前安装过Homebrew,所以followed the instructions用于编译Tiled Map Editor,这是我遇到问题的时候。
答案 0 :(得分:0)
我还没有发现为什么我错过了系统文件,但是我没有重新安装整个操作系统,而是按照this answer中的说明从Yosemite安装程序重新安装Essentials。包括Ruby。
Homebrew现在按预期安装。