Macos 提示brew doctor时的现有配置脚本
我对自制和Anaconda安装完全陌生,我希望有人能在执行brew doctor后帮我解决警告问题。我正在运行雪豹10.6.8。警告如下:Macos 提示brew doctor时的现有配置脚本,macos,configuration,path,homebrew,Macos,Configuration,Path,Homebrew,我对自制和Anaconda安装完全陌生,我希望有人能在执行brew doctor后帮我解决警告问题。我正在运行雪豹10.6.8。警告如下: Warning: "config" scripts exist outside your system or Homebrew directories. `./configure` scripts often look for *-config scripts to determine if software packages are installed,
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
/Users/user.name/anaconda/bin/freetype-config
/Users/user.name/anaconda/bin/libpng-config
/Users/user.name/anaconda/bin/libpng15-config
/Users/user.name/anaconda/bin/llvm-config
/Users/user.name/anaconda/bin/python-config
/Users/user.name/anaconda/bin/python2-config
/Users/user.name/anaconda/bin/python2.7-config
/Users/user.name/anaconda/bin/xml2-config
/Users/user.name/anaconda/bin/xslt-config
我执行了brew--config,下面显示了配置(希望对解决此问题有所帮助):
非常感谢你的帮助。谢谢。tl;dr:您无法真正修复此问题,但您可能可以忽略它 那些以-config结尾的脚本提供了在安装过程中要链接到它们的其他包的信息。让我们以
libpng
为例。如果brew(或任何真正的东西)编译一个依赖于libpng
的包,它可能会执行libpng config
,以了解库的一些详细信息
问题是brew自带了自己版本的libpng
,因此如果同时安装了这两个版本,brew在安装其他软件时可能会选择错误的libpng config
您现在可以执行以下四项操作之一:
~/.bash\u档案
并从路径中删除蟒蛇。如果执行此操作,则每次要运行anaconda python时都必须指定完整路径config
子目录)。这可能会阻止其他软件链接到anaconda组件,但如果您打算隔离anaconda,则应该可以pip install numpy
(要使brew的python成为您的默认设置,请将导出路径=“/usr/local/bin:$PATH”添加到您的~/.bash\u配置文件中
)我相信我已经找到了一个合理安全的方法来处理这个问题(如果你用的是鱼壳的话)
set -gx PATH $PATH ~/bin
source ~/anaconda3/etc/fish/conf.d/conda.fish
请注意,这是鱼的conda外壳配置——使用conda activate some env
切换到蟒蛇环境,而不是bash样式的source activate some env
<代码>brew doctor应显示此问题不再存在
此设置允许您使用conda命令切换到conda管理的环境,而无需担心自制管理的python/依赖关系环境之间的泄漏交互
需要记住的一件事是,当conda环境处于活动状态时,避免运行homebrew,因为您的路径将设置为conda环境,并且对于homebrew的使用不安全。可能的解决方案-
pip install numpy
set -gx PATH $PATH ~/bin
source ~/anaconda3/etc/fish/conf.d/conda.fish