今天在mac系統上安裝graphviz時出現下面問題
執行命令brew install graphviz
, 出現下面錯誤:
Error: You must
brew link libpng
before graphviz can be installed
跟著上面錯誤提示, 又做了如下操作:
macbook-stonedeMacBook-Pro:design stone$
brew link libpng
Linking /usr/local/Cellar/libpng/1.6.21...
Error: Could not symlink share/man/man5/png.5
/usr/local/share/man/man5 is not writable.
出現上述問是由于目錄/usr/local/share/man/man5
沒有寫權限,
只要為其添加寫權限就ok了, 解決方法如下:
chmod -R +w /usr/local/share/man/man5
(這是個目錄, 所以需要迭代為它里面的文件添加權限, 因此需要-R選項)
或者為了防止還需要其他權限又發生錯誤, 直接添加讀/寫/執行
的權限:
chmod -R 777 /usr/local/share/man/man5
添加權限后, 再先后執行命令brew link libpng
和brew install graphviz
就會成功了.
更多關于graphviz信息, 請移步graphviz官網
由于在Android Studio上安裝的PlantUML integration插件無法正常工作, 錯誤提示說需要graphviz的支持, 因此有了上面的歷程~~
要學習PlantUML的可以移步PlantUML官網: http://plantuml.com/