Mac OS X 10.10 brew报错 bad interpreter: No such file or directory

2015-01-12 09:45:43



               

今天尝试用brew 安装 bzr ,结果悲剧的是直接报错!

zhangzhi@moke:~$ brew install bzr
/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 26: /usr/local/Library/brew.rb: Undefined error: 0

网上找一下,原来是 MAC OSX 10.10 更新后,系统默认自带ruby2.0环境,但是brew试用的是ruby1.8版本.

找到brew配置文件,把reby版本改一下.

brew 配置文件所在位置 /usr/local/Library/brew.rb

zhangzhi@moke:~$ nano /usr/local/Library/brew.rb

我们把这个写死的 1.8 修改成 2.0 ,保存退出!

继续安装 bzr,貌似没有问题了!如下图

下载完成后,又悲剧了,编译 时候报错.

==> make man1/bzr.1
/usr/local/Library/ENV/4.3/make: /usr/local/Library/ENV/4.3/xcrun: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/Library/ENV/4.3/make: line 3: /usr/local/Library/ENV/4.3/xcrun: Undefined error: 0
Error: Homebrew doesn't know what compiler versions ship with your version
of Xcode (6.0.1). Please `brew update` and if that doesn't help, file
an issue with the output of `brew --config`:
  https://github.com/Homebrew/homebrew/issues

Note that we only track stable, released versions of Xcode.

Thanks!

READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting

看样子还有一处地方也制定了brew试用ruby1.8 版本,按照错误提示,我们进入这个路径

nano xcrun 

依然是第一行写死了 1.8 版本,改成2.0 保存退出.继续安装 bzr

ok,没有问题了.

你打算打赏多少钱呢?

打赏
(微信扫一扫)