简体   繁体   中英

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'

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)

-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)

[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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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