【问题标题】:Cant understand why Homebrew keeps throwing this errors无法理解为什么 Homebrew 不断抛出这个错误
【发布时间】:2013-10-18 20:57:51
【问题描述】:
User-iMac:~ $ brew doctor
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/fuse.pc

Warning: /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. The following tools exist at both paths:

git
git-cvsserver
git-receive-pack
git-shell
git-upload-archive
git-upload-pack

Consider setting your PATH so that /usr/local/bin
occurs before /usr/bin. Here is a one-liner:
echo export PATH="/usr/local/bin:$PATH" >> ~/.bash_profile

一直在尝试通过 Homebrew 安装 MongoDB,但每次运行“brew doctor”时都会出现此错误

【问题讨论】:

    标签: mongodb homebrew


    【解决方案1】:

    这些本来就不是错误,错误和警告之间有很大的区别; 错误是实际上破坏了整个自制程序的东西,是一种破坏性较小的警告方式,它是程序告诉您系统中存在可能导致错误的问题,因此您可能希望在它们造成任何伤害之前解决它们

    -第一个是说在 /usr/local/lib/pkgconfig/ 目录中有一个他不喜欢的文件(fuse.pc),您应该删除它(您可能需要备份它首先,如果某些程序需要它,您仍然拥有它)

    -第二个是因为你的 $PATH 变量([1])有一些问题,即 /usr/local/bin 目录位于 /usr/bin 目录之前,这可能是一个问题,因为文件夹中存在一些可执行文件(与 git 相关的东西),这通常很糟糕,因为您(或某些数据包管理器)已安装的 /usr/local/bin 中的 git 掩盖了操作系统附带的默认 git,即使它几乎肯定不是 git 的问题,它也可能在未来成为一个问题,例如:即使大多数 unix 世界都在从 phython 2 迁移到 python 3 他们都仍然坚持使用 2.7.x 版本python 并且如果您安装在 /usr/local/bin python 3 中,则操作系统需要运行该系统脚本,系统脚本将使用新版本执行,这是一个巨大的问题,因为 python3 破坏了向后兼容性,因此 python2 脚本将无法运行好吧(它们可能根本不运行)

    [1] $PATH 变量包含一个路径列表,其中终端一个接一个地搜索命令,中间有分号,您的终端从左到右扫描文件夹并使用第一个具有命令名称的可执行文件你要求

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-11-14
      • 2021-05-21
      • 2019-09-01
      • 1970-01-01
      • 1970-01-01
      • 2014-05-18
      • 2023-04-05
      • 1970-01-01
      相关资源
      最近更新 更多