[zz] Homebrew: ruby bad interpreter: No such file or directory

Today when I try to install quantlib (and boost) on my laptop, I got the error message for running

macbook:~ cgao$ brew install boost

/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 23: /usr/local/Library/brew.rb: Undefined error: 0

After some search, I came to this website and got the problem solved:

http://blog.ic3man.gr/2014/06/homebrew-ruby-bad-interpreter-no-such-file-or-directory/

After installing 10.10 DP1 Yosemite (yeah I couldn’t resist the temptation) homebrew gave me the following error:

/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

This error can easily be fixed in the following steps:
1) Open terminal

2) nano /usr/local/Library/brew.rb

3) In the first line change “1.8″ to “Current”, so it should look like this:

#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby -W0

Cheers~

Advertisements

About cgao

Cambridge, MA
This entry was posted in Uncategorized. Bookmark the permalink.

One Response to [zz] Homebrew: ruby bad interpreter: No such file or directory

  1. 犰狳指挥官 says:

    把blog迁移到自己的主机上啦,麻烦惠存~
    http://www.yimingchen.org/blog/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s