gpt4 book ai didi

homebrew - 如何修复 brew doctor 错误?

转载 作者:行者123 更新时间:2023-12-03 05:37:40 28 4
gpt4 key购买 nike

对于这一切,我还是个新手,所以请原谅我的无能。

当我运行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]$

最佳答案

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

当 Brew 链接时,它会创建一个安装的符号链接(symbolic link)。这就是你如何拥有python2.6。 python2.7 已安装,但 python 将运行其中之一。

brew 取消链接 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 文件名

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 文件进行了修改。幸运的是,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 中的所有路径不应以斜杠结尾。因此, Homebrew 程序要求您修复它。

nano ~/.bashrcnano ~/.bash_profile 并查找“/usr/local/git/bin/”并删除尾部斜杠。

关于homebrew - 如何修复 brew doctor 错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10580813/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com