Search code examples
ruby-on-railsstatic-librarieshomebrewlibyaml

Major Warnings when Running Brew Doctor


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

Solution

  • 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.