Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Brew doctor says: "Warning: /usr/local/include isn't writable."

Tags:

macos

homebrew

Brew doctor says:

Warning: /usr/local/include isn't writable. This can happen if you "sudo make install" software that isn't managed by Homebrew.

If a brew tries to write a header file to this directory, the install will fail during the link step.

You should probably chown /usr/local/include

I've tried different commands to solve this but I'm still stuck here.

I'm running homebrew on 10.8.2

like image 955
gaggina Avatar asked Jan 25 '13 17:01

gaggina


4 Answers

Take ownership of it and everything in it.

Mac OS High Sierra or newer: (ty to Kirk in the comments below)

$ sudo chown -R $(whoami) $(brew --prefix)/*

Previous versions of macos:

$ sudo chown -R $USER:admin /usr/local/include

Then do another

$ brew doctor
like image 166
jrwren Avatar answered Nov 15 '22 09:11

jrwren


What worked for me was too

sudo chmod g+w /usr/local
sudo chgrp staff /usr/local
like image 26
Durul Dalkanat Avatar answered Nov 15 '22 08:11

Durul Dalkanat


What worked for me was

$ sudo chown -R yourname:admin /usr/local/bin
like image 40
Ana Isabel Avatar answered Nov 15 '22 08:11

Ana Isabel


The only one that worked for me on El Capitan was:

sudo chown -R $(whoami) /usr/local
like image 39
Husky Avatar answered Nov 15 '22 10:11

Husky