I get the following error when I try to use brew
commands.
zsh: /usr/local/bin/brew: bad interpreter: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin: no such file or directory
I found a few threads that recommend changing the first line on the following /usr/local/Library/brew.rb
file from...
#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -W0
to...
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby -W0
The issue is that I don't have the brew.rb
file in that directory.
Do I need to create the brew.rb
file and add #!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby -W0
?
FYI - The file /usr/local/bin/brew
contains
#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -W0
but if I change it to
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby -W0
and then run the brew
command I get the following error...
/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
require' from /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
require' from /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
'
Any idea?
Thanks lot