Homebrew: “Invalid Multibyte Escape” Error

PROBLEM

When running brew on OS X Maverick, you get this error:-

Error: /usr/local/Library/Homebrew/download_strategy.rb:84: invalid multibyte escape: /^\037\213/
invalid multibyte escape: /^\037\235/
Please report this bug: https://github.com/mxcl/homebrew/wiki/Checklist-before-filing-a-new-issue
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'

SOLUTION

After upgrading to OS X Mavericks, the default version of Ruby is v2.0, causing Homebrew to break because it relies on v1.8. See issue #23655 for more information.

To fix this, run the following command:-

brew update

If you are getting the “Permission Denied” errors when running the above command, run the following command to fix the permission problem:-

# Assuming your user name is USER_HERO
sudo chown -R USER_HERO:admin /usr/local
cd /usr/local
git reset --hard origin/master
brew update

Advertisements

One thought on “Homebrew: “Invalid Multibyte Escape” Error

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