2012-05-14 37 views
62

当谈到这一切时,我非常喜欢新手,所以原谅我的无能。我该如何解决酿造医生的错误

当我运行brew Doctor时,我得到以下结果。有人可以帮忙吗?

[/usr/local]$ brew doctor 

Error: Setting DYLD_LIBRARY_PATH can break dynamic linking. 
You should probably unset it. 
Error: Some keg-only formula are linked into the Cellar. 
Linking a keg-only formula, such as gettext, into the cellar with 
brew link f will cause other formulae to detect them during the 
./configure step. This may cause problems when compiling those 
other formulae. 

Binaries provided by keg-only formulae may override system binaries 
with other strange results. 

You may wish to brew unlink these brews: 

libxml2 

Error: 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/libcharset.1.dylib /usr/local/lib/libfreetype.6.dylib /usr/local/lib/libjpeg.8.dylib /usr/local/lib/liblcms.1.0.19.dylib /usr/local/lib/libMagickCore.4.dylib /usr/local/lib/libMagickWand.4.dylib /usr/local/lib/libpng15.15.dylib /usr/local/lib/libtiff.3.dylib /usr/local/lib/libtiffxx.3.dylib /usr/local/lib/libwmf-0.2.7.1.0.dylib /usr/local/lib/libwmflite-0.2.7.0.1.dylib 
Error: Unbrewed .la files 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 .la files: 
/usr/local/lib/libcharset.la /usr/local/lib/libfreetype.la /usr/local/lib/libjpeg.la /usr/local/lib/liblcms.la /usr/local/lib/libMagickCore.la /usr/local/lib/libMagickWand.la /usr/local/lib/libpng15.la /usr/local/lib/libtiff.la /usr/local/lib/libtiffxx.la /usr/local/lib/libwmf.la /usr/local/lib/libwmflite.la 
Error: 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/freetype2.pc /usr/local/lib/pkgconfig/ImageMagick.pc /usr/local/lib/pkgconfig/lcms.pc /usr/local/lib/pkgconfig/libpng15.pc /usr/local/lib/pkgconfig/MagickCore.pc /usr/local/lib/pkgconfig/MagickWand.pc /usr/local/lib/pkgconfig/Wand.pc 
Error: 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/libcharset.a /usr/local/lib/libfreetype.a /usr/local/lib/libjpeg.a /usr/local/lib/liblcms.a /usr/local/lib/libpng15.a /usr/local/lib/libtiff.a /usr/local/lib/libtiffxx.a /usr/local/lib/libwmf.a /usr/local/lib/libwmflite.a 
Error: You have uncommitted modifications to Homebrew's core. 
Unless you know what you are doing, you should run: 
cd /usr/local && git reset --hard 
Error: Some directories in your path end in a slash. 
Directories in your path should not end in a slash. This can break other 
doctor checks. The following directories should be edited: 
/usr/local/git/bin/ 
[/usr/local]$ 

回答

60
Error: Setting DYLD_LIBRARY_PATH can break dynamic linking. You should probably unset it. Error: Some keg-only formula are linked into the Cellar. Linking a keg-only formula, such as gettext, into the cellar with brew link f will cause other formulae to detect them during the ./configure step. This may cause problems when compiling those other formulae. 

Binaries provided by keg-only formulae may override system binaries with other strange results. 

这是要求您取消设置动态加载库路径。您可以通过找出您设置的位置并将其删除来做到这一点。最有可能的,你有你的〜/ .bashrc线或〜/ .bash_profile中,看起来像export DYLD_LIBRARY_PATH=/some/path:$DYLD_LIBRARY_PATH

You may wish to brew unlink these brews: 

libxml2 

当酿造环节,它的创建符号链接的安装。这就是你如何拥有python2.6。 python2.7安装,但python将运行其中之一。

brew unlink libxml2

Error: 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/libcharset.1.dylib /usr/local/lib/libfreetype.6.dylib /usr/local/lib/libjpeg.8.dylib /usr/local/lib/liblcms.1.0.19.dylib /usr/local/lib/libMagickCore.4.dylib /usr/local/lib/libMagickWand.4.dylib /usr/local/lib/libpng15.15.dylib /usr/local/lib/libtiff.3.dylib /usr/local/lib/libtiffxx.3.dylib /usr/local/lib/libwmf-0.2.7.1.0.dylib /usr/local/lib/libwmflite-0.2.7.0.1.dylib Error: Unbrewed .la files 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 .la files: /usr/local/lib/libcharset.la /usr/local/lib/libfreetype.la /usr/local/lib/libjpeg.la /usr/local/lib/liblcms.la /usr/local/lib/libMagickCore.la /usr/local/lib/libMagickWand.la /usr/local/lib/libpng15.la /usr/local/lib/libtiff.la /usr/local/lib/libtiffxx.la /usr/local/lib/libwmf.la /usr/local/lib/libwmflite.la Error: 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/freetype2.pc /usr/local/lib/pkgconfig/ImageMagick.pc /usr/local/lib/pkgconfig/lcms.pc /usr/local/lib/pkgconfig/libpng15.pc /usr/local/lib/pkgconfig/MagickCore.pc /usr/local/lib/pkgconfig/MagickWand.pc /usr/local/lib/pkgconfig/Wand.pc Error: 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/libcharset.a /usr/local/lib/libfreetype.a /usr/local/lib/libjpeg.a /usr/local/lib/liblcms.a /usr/local/lib/libpng15.a /usr/local/lib/libtiff.a /usr/local/lib/libtiffxx.a /usr/local/lib/libwmf.a /usr/local/lib/libwmflite.a 

这些是从其他设备残留文件。你可以删除它们。

rm FILENAME

Error: You have uncommitted modifications to Homebrew's core. Unless you know what you are doing, you should run: cd /usr/local && git reset --hard 

这里,告诉你,你所做的修改,以自制的文件。幸运的是,Homebrew存储在Git版本控制中,因此您可以恢复这些更改。

cd /usr/local && git reset --hard

Error: Some directories in your path end in a slash. Directories in your path should not end in a slash. This can break other doctor checks. The following directories should be edited: /usr/local/git/bin/ 

PATH变量是在您的计算机搜索程序,当你在命令行中键入它。你可以看到你的路径echo $PATH

标准规定PATH中的所有路径不应以斜杠结尾。因此,自制软件正在要求您修复它。

nano ~/.bashrcnano ~/.bash_profile并查找'/ usr/local/git/bin /'并删除结尾的斜杠。

+3

还记得当你编辑该文件时重新启动终端或运行source〜/ .bashrc – kwyoung11

3

我是新来酿造的。当我第一次尝试时,我最终发现了一系列错误。并非所有都需要以便我根据需要使用brew进行修复。特别是,我能够忽略我正在收到的消息。我相信这只是一个问题,当你使用brew安装的软件包会干扰你以前安装的软件(在我的情况下,这是NTFS-3g,与我未来酿造的用途无关)。