Brew error: Failed to create symbolic link, path not writable

When I try to install the library with homebrew ( brew install aLibrary ), I got the following error:

 Could not symlink lib/pkgconfig/aFile /usr/local/lib/pkgconfig is not writable. 

What should I do?

There are several questions and answers ( 1 , 2 , etc.) regarding this brew error, this is an attempt to make the general question suggested here .

+42
homebrew package
Jan 05 '15 at 17:16
source share
3 answers

As explained here by Rick :

Start with a brew doctor who will show you the errors with setting up brew.

You may see something like this: "Warning: / usr / local / lib / pkgconfig is not writable."

This will give you advice: "You should probably chown / usr / local / lib / pkgconfig."

This means: sudo chown -R $(whoami) /usr/local/lib/pkgconfig

Then you will need to link the files to this: brew link yourLibrary

If this does not work, then the output of brew doctor will give you enough to continue your search.

+102
Jan 05 '15 at 17:16
source share

Use the following.

 $ brew doctor 

an error message will appear. If any is found, run the following option.

 $ brew prune 

after removal go to agian link

 $ brew link python 
+1
Mar 10 '17 at 20:30
source share

I uninstalled brew, reinstalled, then the problems disappeared.

0
May 19 '16 at 4:03
source share



All Articles