简体   繁体   English

不能理解为什么自制软件不断抛出此错误

[英]Cant understand why Homebrew keeps throwing this errors

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

Been trying to install MongoDB through Homebrew but I keep getting this errors every time I run 'brew doctor' 一直试图通过Homebrew安装MongoDB,但是每次我运行“ brew doctor”时,我都会不断收到此错误

those are not errors in the first place, there is a huge difference between error and warning; 首先不是错误,错误和警告之间存在巨大差异; an error is something that breaks practically the whole homebrew, a warning way less disruptive it's the program telling you that there are problems in your system that might cause errors so you could want to solve them before they can cause any harm 错误实际上是破坏了整个自制程序的一种警告,它的破坏性较小,它是该程序告诉您系统中的某些问题可能会导致错误,因此您可能希望先解决这些问题,然后再对他们造成任何损害

-the first is saying that in the /usr/local/lib/pkgconfig/ directory there is a file (fuse.pc) that he doesn't like and that you should remove it (you may want to back it up first so that if some program needs it you still have it) -首先是说/ usr / local / lib / pkgconfig /目录中有一个他不喜欢的文件(fuse.pc),您应该删除它(您可能要先备份它,以便如果某些程序需要它,您仍然有它)

-the second is because you have some problems in your $PATH variable([1]), namely the /usr/local/bin directory comes before the /usr/bin dir, and that could be a problem since in that folder there are some executables (git related stuff) that are present on both this is generally bad since the git placed in /usr/local/bin that you (or some packet manager) have installed masks the default git that came with your OS, even if it is almost certainly not a problem with git it could become one in future for example: even if most of the unix world is in the process of migrating from phython 2 to python 3 they are all still stuck to 2.7.x version of python and that is required for the OS to work if you installed in /usr/local/bin python 3 the system script would be executed with the new version and that is huge problem since python3 breaks backward compatibility and so python2 scripts won't run well (they may as well not run at all) -第二个是因为$ 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] the $PATH variable contains a list of paths where the terminal searches for commands one after the other with semicolons in between, your terminal scans the folders from left to right and uses the first executable with the name of the command you requested [1] $ PATH变量包含一个路径列表,终端在其中依次搜索命令,终端之间用分号表示,终端从左到右扫描文件夹,并使用第一个可执行文件和所请求命令的名称

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM