brew link mysql did not complete

21,395

Solution 1

I figured what the problem was. It was issues with premission and I basically did this

sudo chown -R $(whoami) /usr/local/lib/

Solution 2

I believe You should:

sudo chmod 775 /usr/local/lib/

and make sure You are member of the file's group.

Solution 3

Not really an answer, but a comment that may help those who are pulling out hair chowning and chmoding like crazy and still getting "not writeable" errors at linking. For example, from $ brew doctor -d

Error: /usr/local/lib/pkgconfig isn't writable.

This can happen if you "sudo make install" software that isn't managed by
by Homebrew. If a formula tries to write a file to this directory, the
install will fail during the link step.

I suggest you check the linked file and it's dependencies and either delete them and reinstall via homebrew, or install the package without using homebrew.

Solution 4

In my system this worked perfectly.

chown -R $(whoami) /usr/local/share/
Share:
21,395
tawheed
Author by

tawheed

Updated on February 16, 2020

Comments

  • tawheed
    tawheed about 4 years

    For some some reason brew does not link mysql and it complains about permission. I chmod the folder to 777 but I am still having the same issues

      laptop$ brew install mysql 
    

    Error:

     mysql-5.5.27 already installed, it's just not linked
    
     laptop$ brew link mysql
    
     Linking /usr/local/Cellar/mysql/5.5.27... Warning: Could not link mysql. 
    

    Unlinking...

        Error:
        Could not symlink file: /usr/local/Cellar/mysql/5.5.27/lib/plugin
        /usr/local/lib is not writable. You should change its permissions.
    
  • Aivoric
    Aivoric almost 9 years
    Wow - I wish I found this earlier... thank you SO MUCH!