3

So I just installed qt via brew in Mac OS X. It was unable to link it however. When I try to run brew link qt or brew link --overwrite qt I get back the following:

tonybeninate$ brew link --overwrite qt
Linking /usr/local/Cellar/qt/4.8.4... Warning: Could not link qt. Unlinking...

Error: Directory not empty - /usr/local/opt/qt

Anyone have any suggestions? I've also tried running brew link -n qt and removing any files/dirs that were conflicting to no avail.

Tony Beninate
  • 1,926
  • 1
  • 24
  • 44

1 Answers1

0

Try brew cleanup.

Even with above command, you might get similar error. To fix it, change permissions with

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

If you are on Mac High Sierra, use

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

Follow this post for more permissions related changes

Once permissions are done, try brew cleanup and your command brew link --overwrite qt

Harshit
  • 692
  • 10
  • 17