mxcl/homebrew — Issue #9882: Unable to run "brew upgrade": undefined "brew_install"
Author: remino
Created: 2012-01-31 03:32:44+00:00
State: open

Similar to closed issue #1676, yet not happening in the same manner, I'm unable to call ````brew upgrade````:

Error: undefined local variable or method `brew_install' for main:Object
Please report this bug:
https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue
/usr/local/Library/Contributions/examples/brew-upgrade.rb:11
/usr/local/bin/brew:47:in `require'
/usr/local/bin/brew:47:in `require?'
/usr/local/bin/brew:80

Output of ````brew doctor````:

Unbrewed dylibs were found in /usr/local/lib.

If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
/usr/local/lib/libgio-2.0.0.dylib
/usr/local/lib/libglib-2.0.0.dylib
/usr/local/lib/libgmodule-2.0.0.dylib
/usr/local/lib/libgobject-2.0.0.dylib
/usr/local/lib/libgthread-2.0.0.dylib
/usr/local/lib/libintl.8.dylib

Unbrewed .la files were found in /usr/local/lib.

If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .la files:
/usr/local/lib/libgio-2.0.la
/usr/local/lib/libglib-2.0.la
/usr/local/lib/libgmodule-2.0.la
/usr/local/lib/libgobject-2.0.la
/usr/local/lib/libgthread-2.0.la
/usr/local/lib/libintl.la

gettext was detected in your PREFIX.

The gettext provided by Homebrew is "keg-only", meaning it does not
get linked into your PREFIX by default.

If you `brew link gettext` then a large number of brews that don't
otherwise have a `depends_on 'gettext'` will pick up gettext anyway
during the `./configure` step.

If you have a non-Homebrew provided gettext, other problems will happen
especially if it wasn't compiled with the proper architectures.

I don't think the output above relates to my problem, but if I'm mistaken, please let me know.

The same symptom occurred before and after I ran ````brew update```` just now.