3

I ran brew doctor and got a few warning messages that I think I know what actions to take to fix, but want to see if I'm on the right track. Here is the list of warnings I received:

Warning: /usr/local/lib/pkgconfig isn't writable.

This can happen if you "sudo make install" software that isn't managed by
by Homebrew. If a formula tries to write a file to this directory, the
install will fail during the link step.

You should probably `chown` /usr/local/lib/pkgconfig

Warning: 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/mann

Warning: 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/libtcl8.6.dylib
    /usr/local/lib/libtk8.6.dylib

Warning: 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/tcl.pc
    /usr/local/lib/pkgconfig/tk.pc

Warning: Unbrewed static libraries 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 static libraries:
    /usr/local/lib/libtclstub8.6.a
    /usr/local/lib/libtkstub8.6.a

Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:

    libyaml

For the first case, should I run chown <user>/usr/local/lib/pkgconfig

Warning: /usr/local/lib/pkgconfig isn't writable.

    This can happen if you "sudo make install" software that isn't managed by
    by Homebrew. If a formula tries to write a file to this directory, the
    install will fail during the link step.

    You should probably `chown` /usr/local/lib/pkgconfig

Then chown <user>/usr/local/share/man/mann for the next message

Warning: 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/mann

Not sure what to do for these warnings about deleting files. (???)

Warning: 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/libtcl8.6.dylib
        /usr/local/lib/libtk8.6.dylib

    Warning: 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/tcl.pc
        /usr/local/lib/pkgconfig/tk.pc

    Warning: Unbrewed static libraries 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 static libraries:
        /usr/local/lib/libtclstub8.6.a
        /usr/local/lib/libtkstub8.6.a

Finally run brew link libyaml?

Warning: You have unlinked kegs in your Cellar
    Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
    those kegs to fail to run properly once built. Run `brew link` on these:

        libyaml
cphill
  • 5,596
  • 16
  • 89
  • 182

2 Answers2

0

To fix the permissions problems, you can chown -R your_username /usr/local to recursively change ownership of everything under /usr/local.

You should brew link libyaml.

The warnings about dylibs tell you that you have a Tcl/Tk library installed to /usr/local. If you know how it got there and you know you do not need it, you can uninstall it. If you don't know how it got there, you can rename its files so builds won't pick it up (and so you can put them back if you discover that something depends on them). It's probably fine to leave it in place unless and until something breaks in a Tk-related way; it's possible it will never cause you trouble.

Tim Smith
  • 6,127
  • 1
  • 26
  • 32
  • What if there are multiple users on the machine? Surely it doesn't make sense for one user to take ownership of /usr/local. – Desty Oct 16 '14 at 14:19
  • 1
    In that case, all users with permission to install software with Homebrew must have write access to the Homebrew prefix. Setting the appropriate group permissions and umask should work fine. Brewdo is another approach that uses a dedicated Homebrew user account: https://github.com/zigg/brewdo Alternatively, users can manage their own installs in their Users folder. – Tim Smith Oct 17 '14 at 06:03
  • Thanks Tim, that makes sense. It might be good to have these options explained on the Homebrew site's installation help guide or FAQ. Mind if I mail them a link to your comment? – Desty Oct 17 '14 at 11:30
  • Sure, I'm a Homebrew maintainer. If you'd like to open an issue at https://github.com/Homebrew/homebrew/issues that would be helpful, thanks! None of the maintainers use or test Homebrew in a multi-user configuration (I think it's a little unusual) so I'd want to invest a little time to make sure it's robust and figure out specifically what commands to recommend for the group-permissions case. – Tim Smith Oct 17 '14 at 14:10
0

I solved the issue by running sudo chown <user>/usr/local/lib/pkgconfig, sudo chown <user>/usr/local/share/man/mann.

Then I deleted the files recommended and ran brew link libyaml and everything was fine.

cphill
  • 5,596
  • 16
  • 89
  • 182