3

我跑了brew doctor,收到了一些警告消息,我想我知道要采取什么措施来修复,但想看看我是否走在正确的轨道上。这是我收到的警告列表:

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

对于第一种情况,我应该运行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

然后chown <user>/usr/local/share/man/mann对于下一条消息

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

终于跑了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
4

2 回答 2

0

要解决权限问题,您可以chown -R your_username /usr/local递归地更改 /usr/local 下所有内容的所有权。

你应该brew link libyaml

关于 dylibs 的警告告诉你,你有一个 Tcl/Tk 库安装到 /usr/local。如果您知道它是如何到达那里的并且您知道您不需要它,您可以卸载它。如果你不知道它是如何到达那里的,你可以重命名它的文件,这样构建就不会拾取它(如果你发现某些东西依赖于它们,你可以把它们放回去)。除非并且直到某些东西以与 Tk 相关的方式发生故障,否则将其留在原处可能很好;它可能永远不会给你带来麻烦。

于 2014-08-22T02:23:48.477 回答
0

我通过运行sudo chown <user>/usr/local/lib/pkgconfig,解决了这个问题sudo chown <user>/usr/local/share/man/mann

然后我删除了推荐的文件并运行brew link libyaml,一切都很好。

于 2014-08-22T02:24:21.090 回答