ruby-on-rails - 运行 Brew Doctor 时的主要警告

标签 ruby-on-rails static-libraries homebrew libyaml

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

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

最佳答案

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

你应该brew link libyaml

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

关于ruby-on-rails - 运行 Brew Doctor 时的主要警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25437865/

相关文章:

reactjs - yarn 开始 : Could not find or load main class start

ruby-on-rails - 使用带有Rails的jBuilder Elasticsearch动态设置 key

c - 获取链接静态库时使用的存档成员列表

bash - 当我启动终端时,我得到 "login:/usr/local/bin/bash: No such file or directory [Process completed]"并且我无法在终端中输入任何内容

swift - 如何使用 swiftc 创建可导入的 Swift 库

c++ - 使用 Homebrew 软件在 Mac 上安装 openmp

ruby-on-rails - 在 Rails 4.1 中使用 Searchkick gem 在 Elasticsearch 中设置 Facets

ruby-on-rails - PG gem 不会安装在 Rails 应用程序中:Gem::Ext::BuildError: ERROR: Failed to build gem native extension

ruby-on-rails - Rack Pow 无法启动 ENOENT