Skip to content

Bug Fixing Checklist

mikemcquaid edited this page Jun 26, 2012 · 1 revision

Checklist

  • Did you brew update?
  • Did you brew doctor?
  • Are you running the latest stable version of Xcode?
    • Are the Command Line Tools for Xcode up to date?
  • Have you installed the Java Developer Update?
  • Have you completely removed Macports and/or Fink?
  • Do you need to sudo chown -R $USER /usr/local and sudo chown -R $USER /usr/local/.git?
  • Did you read through the Common Issues page?

Open A New Issue

If you’ve done all of the above then:

  1. Gist your brew install -v $FORMULA, your brew --config, and brew doctor outputs.
  2. Gist your configure log if it refers to the formula you can’t install cat ~/Library/Logs/Homebrew/config.log | pbcopy
  3. File an issue with a link to the gists. Be sure to post a http: link, not a git: link as we want to read your logs, not clone them.

Please, please do not just paste the install log into a new issue!
Really long posts make it difficult to navigate the thread. Additionally, since GitHub issue posts are parsed as Markdown, chances are the log will be rendered incorrectly anyway.

If you do not mention your brew doctor output when you create the ticket we will take it as proof that you didn’t read this paragraph and we will mock you mercilessly! Like seriously, do you have any idea how many tickets people file a day? Most of them sadly would be solved just be running `brew doctor`. PLEASE DON’T MAKE US CRY!

An easy way to capture all the output of brew install -v is:

brew install -v $FORMULA 2>&1 | pbcopy

The Finer Details…

Up to date?

We might have already fixed the problem. Please run brew update again.

`brew doctor`

Run the brew doctor command to do a sanity check on your configuration.

Xcode version

Newer beta (and older stable) versions of Xcode cause issues with many formulae. Make sure you are running Apple’s latest stable release for your version of OS X. More information on Xcode and Homebrew can be found here.

As of Xcode 4.3, you can choose to install only the Command Line Tools for Xcode or the full Xcode suite from the App Store. Note that you must still install the command line tools from within Xcode if you choose the latter.

Other methods of installing compilers, such as the osx-gcc-installer, are unsupported. Software that require headers and other resources that are normally provided by Xcode will fail to compile, and as such we recommend you install Xcode or the standalone Command Line Tools package.

Java Developer Update

Apple’s changed its Java packages to no longer install all necessary headers. Please install the Java Developer Update from Apple. If you see an error referencing “jni.h” this is probably because you haven’t done this yet.

Uninstall MacPorts and Fink

Building C/C++ is ridiculously complicated. Any number of things can go wrong, and it’s pretty common to get conflicts between different versions of the same library… or for a build tool to use the wrong version of a library.

For example, CouchDB will look in the MacPorts directory even if it isn’t in the path, and this will break the brew installation.

Homebrew may still work, just be aware of the risks.

Clear out /usr/local of stuff you installed without a package manager before installing Homebrew

brew list --unbrewed | egrep '^(lib|include)'

If anything shows up, you should consider deleting these files especially if they are common libraries like libexpat. You have no idea how many bug reports turn out to be because of this sort of thing.

Installing Homebrew in a FileVault-enabled $HOME may cause problems with permissions

If Homebrew is installed in a user directory and FileVault is enabled for this user, the following formulae have reported issues:

  • htop (need to be run as sudo to see all processes)
  • mysql (if ran in a screen, must be restarted after logout/login)

Using sudo and fixing permissions

Running brew install or installed programs as root may cause permission problems. Please try reinstalling problematic formulae without using sudo.

Regardless, you might have still broken your permissions somehow. Fix them by running sudo chown -R $USER `brew --prefix`.

Keep in mind that some software, especially non-Homebrew installations of things like MySQL, expect certain permissions or ownership on some directories and recursively changing ownership of these directories may break things. If you have non-Homebrew things installed alongside Homebrew in /usr/local, you should avoid `chown -R` and instead `chown` only the things that Homebrew needs, i.e. the Cellar, Library, and the normal UNIX software directories: bin, etc, include, lib, sbin, share, and var.