Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I just ran the Homebrew script as described in the installation page. I then ran brew doctor in Terminal, and it returned several errors. I'm not sure how to fix those errors, please help.

brew doctor

Error: Some directories in /usr/local/share/man aren't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a brew tries to add locale information to one of these
directories, then the install will fail during the link step.
You should probably `chown` them:

    /usr/local/share/man/de
    /usr/local/share/man/de/man1
Error: You have Xcode 4.2, which is outdated.
Please install Xcode 4.3.
Error: 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/libcdt.5.dylib    /usr/local/lib/libcgraph.6.dylib    /usr/local/lib/libgraph.5.dylib    /usr/local/lib/libgvc.6.dylib    /usr/local/lib/libgvpr.2.dylib    /usr/local/lib/libpathplan.4.dylib    /usr/local/lib/libxdot.4.dylib
Error: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .pc files:
    /usr/local/lib/pkgconfig/libcdt.pc    /usr/local/lib/pkgconfig/libcgraph.pc    /usr/local/lib/pkgconfig/libgraph.pc    /usr/local/lib/pkgconfig/libgvc.pc    /usr/local/lib/pkgconfig/libgvpr.pc    /usr/local/lib/pkgconfig/libpathplan.pc    /usr/local/lib/pkgconfig/libxdot.pc
Error: /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. The following tools exist at both paths:

    2to3

Consider amending your PATH so that /usr/local/bin
is ahead of /usr/bin in your PATH.
share|improve this question

2 Answers 2

Definitely back up those dylib's and pc's. Not having them around breaks graphviz (especially the python bindings). Copy them back to their directories once you're all set.

If you forget to back them up, and graphiz stops working with "Image Not Found" errors on libraries, just reinstall the graphviz application from the website (http://www.graphviz.org/Download_macos.php).

It seems like the name of the game here is ignoring those particular brew doctor warnings.

share|improve this answer
up vote 17 down vote accepted

I managed to get it up and running after much Googling and fiddling.

First, you need to make the directories writable using "chown".

sudo chown $(whoami) /usr/local/share/man/de
sudo chown $(whoami) /usr/local/share/man/de/man1

Then install Xcode 4.3 from the App Store, and install command line tools from Xcode->Preferences->Downloades->Components. Then set a valid path to Xcode 4.3.

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

There are some unexpected dylib and .pc files from GraphViz. It's probably safe to delete them directly but I chose to back them up instead in case other applications break. To back them up:

mkdir -p ~/brew-backup/lib/pkgconfig/
mv /usr/local/lib/*.*.dylib ~/brew-backup/lib/
mv /usr/local/lib/pkgconfig/*.pc ~/brew-backup/lib/pkgconfig/

Finally, amend the system PATH so that /usr/local/bin appears ahead of other paths.

export PATH=/usr/local/bin:/usr/local/sbin:$PATH

Check that there is no more error by running

brew doctor

Update brew to keep package information up to date, and you're ready to go.

brew update
share|improve this answer
    
From my experience, you can safely ignore most brew doctor errors, except for when you really can't install something. –  slhck Jun 12 '12 at 14:29
    
Shouldn't those directories be owned by root, though? –  Blacklight Shining Aug 13 '12 at 2:20
    
Copy and paste all the directories, set to a variable by: directories="PASTE HERE". echo "$directories" | while read line; do echo "$line"; sudo chown $(whoami) "$line"; echo; done; –  Jared Burrows Feb 1 '13 at 21:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.