fixing a Mac home `brew update` that has permission errors (after that I could install plantuml)
Posted by jpluimers on 2017/01/26
I had this occurring on my system:
RetinaMBPro1TB:~ jeroenp$ brew update error: unable to unlink old 'Library/ENV/pkgconfig/10.11/libcurl.pc' (Permission denied) error: unable to unlink old 'Library/ENV/pkgconfig/10.11/libxml-2.0.pc' (Permission denied) error: unable to unlink old 'Library/ENV/pkgconfig/10.11/sqlite3.pc' (Permission denied) To restore the stashed changes to /usr/local run: 'cd /usr/local && git stash pop' Already up-to-date.
This is how I solved it:
RetinaMBPro1TB:~ jeroenp$ ls -al /usr/local | grep -w Library drwxr-xr-x+ 11 jeroenp admin 374 Mar 9 19:33 Library RetinaMBPro1TB:~ jeroenp$ sudo chown -R $USER /usr/local/Library/ Password: RetinaMBPro1TB:~ jeroenp$ brew update To restore the stashed changes to /usr/local run: 'cd /usr/local && git stash pop' Updated Homebrew from d32996d to 638d755. ==> New Formulae ... ==> Updated Formulae ... ==> Renamed Formulae ... ==> Deleted Formulae ... RetinaMBPro1TB:~ jeroenp$
The above solution is based on major python problems · Issue #48301 · Homebrew/homebrew
After that, I could install plantuml (which requires java, just so you know) so now I can create SVGs from it locally:
plantuml -tsvg PSO.network-diagram.PlantUML.txt
Note I had to edit the formula so it installs plantuml-8037 or higher (the git version back then installed plantuml-8031) as it fixed a namespace bug. Since plantuml releases often, be prepared to do some version fiddling.
–jeroen
Leave a Reply