我跑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
答案 0 :(得分:0)
要解决权限问题,您可以chown -R your_username /usr/local
以递归方式更改/ usr / local下所有内容的所有权。
你应该brew link libyaml
。
有关dylibs的警告告诉您,您已在/ usr / local中安装了Tcl / Tk库。如果你知道它是如何到达的,你知道你不需要它,你可以卸载它。如果你不知道它是如何到达那里的,你可以重命名它的文件,这样构建就不会捡起它(所以你可以把它们放回去,如果你发现某些东西取决于它们)。将它留在原处可能没问题,除非并且直到Tk相关的方式发生故障;它可能永远不会给你带来麻烦。
答案 1 :(得分:0)
我通过运行sudo chown <user>/usr/local/lib/pkgconfig
,sudo chown <user>/usr/local/share/man/mann
来解决了这个问题。
然后我删除了推荐的文件并运行了brew link libyaml
,一切都很好。