I installed weechat 1.9(an IRC client) with brew a long time ago. Today I was trying to update the program to the latest version with 'brew upgrade weechat'. The whole upgrading process was successful, only with an error at the end that says
Error: The
brew link
step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink share/man/de/man1/weechat-headless.1
/usr/local/share/man/de/man1 is not writable.
I first figured it might be for the reason that the /usr/local/share/man/de/man1 directory was not writable due to the user that homebrew runs as was not given enough access privilege. I then changed the group owner of the directory from 'wheel' to 'admin' which is the owner of most of the directories generated by homebrew. But it didn't work.
I tried to uninstall and reinstall weechat, it's still the same error.
Best Answer
Just fixed this same issue on my system!
From this related thread about a similar
brew link
issue withnmap
:Apparently some software will write to that folder using root privileges on install so there is an ownership issue here.
To fix:
ls -la /usr/local/share/man/
whoami
) in group "admin"sudo chown -R $(whoami):admin /usr/local/share/man/de/
brew link weechat
The above steps fixed the issue for me!