gpt4 book ai didi

macos - 提示时的现有配置脚本

转载 作者:行者123 更新时间:2023-12-01 18:22:37 25 4
gpt4 key购买 nike

我对 Homebrew 和 Anaconda 安装完全陌生,我希望有人可以帮助我解决执行brew doctor 后出现的警告。我正在 Snow Leopard 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, 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,以下显示了配置(希望它有助于解决问题):

HOMEBREW_VERSION: 0.9.4
ORIGIN: (none)
HEAD: (none)
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: dual-core 64-bit penryn
OS X: 10.6.8-i386
Xcode: 3.2.6
GCC-4.0: build 5494
GCC-4.2: build 5666
LLVM-GCC: build 2335
Clang: 1.7 build 77
X11: 2.7.4 => /opt/X11
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /Users/user.name/anaconda/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

非常感谢您的帮助。谢谢。

最佳答案

tl;dr:你无法真正解决这个问题,但你可以忽略它

那些以 -config 结尾的脚本为在安装过程中想要链接到它们的其他包提供信息。让我们以libpng 为例。如果brew(或者其他任何东西)编译了一个依赖于libpng的包,它可能会执行libpng-config来找出有关该库的一些详细信息。

问题在于,brew 带来了自己的 libpng 版本,因此如果安装了两者,则在安装其他软件时,brew 可能会选择错误的 libpng-config

您现在可以执行以下四件事之一:

  1. 如果您确信使用 Homebrew 程序安装的内容不会与 anaconda 附带的内容发生冲突,请忽略该警告。

  2. 编辑您的 ~/.bash_profile 并从 PATH 中删除 anaconda。如果这样做,则每次要运行 anaconda python 时都必须指定完整路径。

  3. 将这些 anaconda 配置文件移到一边(从 PATH 中移出,例如移至 config 子目录中)。这可能会阻止其他软件链接到 anaconda 组件,但如果您打算保持 anaconda 隔离,应该没问题。

  4. 完全删除anaconda(只需删除文件夹)并安装brew版本的python。这还将为您提供pip,这应该可以轻松地重新安装 anaconda 附带的大多数其他软件包。

    brew install python

    然后安装例如numpy,简单地说:

    pip install numpy

    (要使brew的python成为默认添加export PATH="/usr/local/bin:$PATH"到您的~/.bash_profile)

关于macos - 提示时的现有配置脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16367339/

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