当我尝试使用brew
命令时,出现以下错误。
zsh:/ usr / local / bin / brew:糟糕的翻译: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin:no 这样的文件或目录
我发现few threads建议更改以下/usr/local/Library/brew.rb
文件中的第一行...
#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -W0
为...
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby -W0
问题是我在该目录中没有brew.rb
个文件。
我是否需要创建brew.rb
文件并添加#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby -W0
?
仅供参考 - 文件/usr/local/bin/brew
包含
#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -W0
但如果我将其更改为
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby -W0
然后运行brew
命令我收到以下错误...
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
require': /usr/local/Library/Homebrew/extend/pathname.rb:191: invalid multibyte escape: /^\037\213/ (SyntaxError) invalid multibyte escape: /^\037\235/ invalid multibyte escape: /^\xFD7zXZ\x00/ from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
需要&#39;来自/usr/local/Library/Homebrew/global.rb:2:in<top (required)>' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
要求&#39;从 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from /usr/local/bin/brew:17:in
&#39;
有什么想法吗?
非常感谢