Homebrew: brew doctor throwing up a lot of errors, how can I fix them? [closed]

我怕爱的太早我们不能终老 提交于 2019-12-03 03:12:07
Ewan

It states in the error message what the problem is;

Warning: /usr/local/include isn't writable
You should probably change the ownership and permissions of /usr/local

back to your user account.

If you run ls -l /usr/local/ you should have an output like this:

total 4
-rw-r--r--    1 user  admin    493 23 Apr 15:14 CONTRIBUTING.md
drwxr-xr-x   17 user  admin    578  5 May 14:54 Cellar
drwxr-xr-x    3 user  admin    102 23 Apr 16:33 Frameworks
drwxr-xr-x   10 user  admin    340 24 Apr 08:50 Library

Where user is your username and admin is your group. If you see something more like:

drwxr-xr-x   17 root  wheel    578  5 May 14:54 Cellar

you will have to run chown -R user:admin /usr/local which will change the ownership back to your user.

This should solve the first part. However, be warned, this could stop other software working if you have previously run "sudo make install" software that isn't managed by Homebrew.

There is also a great answer on How do i fix brew doctor errors that addresses your DYLD_LIBRARY_PATH issues.

Basically you have things in /usr/local that are not done via homebrew and confuses it. So you have to choose to keep the homebrew stuff or the others.

If you do not know which is which I would backup /usr/local amd delete it and start with all homebrew or all others.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!