美文网首页
Mac 安装 graphviz

Mac 安装 graphviz

作者: LeeSpringFly | 来源:发表于2017-07-01 10:36 被阅读0次

    emacs 配置 plantuml 需要安装 graphviz

    brew install graphviz
    
    bogon:~ lpc$ brew install graphviz
    Updating Homebrew...
    ==> Auto-updated Homebrew!
    Updated 1 tap (homebrew/core).
    ==> New Formulae
    apache-arrow                             kubectx
    ==> Updated Formulae
    allure                     ecl                        osquery
    angular-cli                giter8                     paket
    armor                      gofabric8                  phoronix-test-suite
    artifactory                gor                        pick
    aurora-cli                 groovy                     plantuml
    aws-sdk-cpp                influxdb@0.8               qt
    awscli                     ipbt                       rkhunter
    bash-completion@2          kubernetes-cli             rocksdb
    bind                       libgcrypt                  saldl
    c-ares                     libtensorflow              streamlink
    capnp                      libupnp                    swiftformat
    consul-template            llvm                       terraform
    convox                     logrotate                  texmath
    cromwell                   mongodb                    tippecanoe
    crystal-lang               nano                       tor
    dbus                       node                       vifm
    diffoscope                 node-build                 wireguard-tools
    direnv                     nodeenv
    
    ==> Installing dependencies for graphviz: libtool, libpng, freetype, fontconfig, jpeg, libtiff, webp, gd
    ==> Installing graphviz dependency: libtool
    ==> Downloading https://homebrew.bintray.com/bottles/libtool-2.4.6_1.sierra.bott
    ######################################################################## 100.0%
    ==> Pouring libtool-2.4.6_1.sierra.bottle.tar.gz
    ==> Using the sandbox
    ==> Caveats
    In order to prevent conflicts with Apple's own libtool we have prepended a "g"
    so, you have instead: glibtool and glibtoolize.
    ==> Summary
    🍺  /usr/local/Cellar/libtool/2.4.6_1: 70 files, 3.7MB
    ==> Installing graphviz dependency: libpng
    ==> Downloading https://homebrew.bintray.com/bottles/libpng-1.6.29.sierra.bottle
    ######################################################################## 100.0%
    ==> Pouring libpng-1.6.29.sierra.bottle.tar.gz
    🍺  /usr/local/Cellar/libpng/1.6.29: 26 files, 1.2MB
    ==> Installing graphviz dependency: freetype
    ==> Downloading https://homebrew.bintray.com/bottles/freetype-2.8.sierra.bottle.
    ######################################################################## 100.0%
    ==> Pouring freetype-2.8.sierra.bottle.tar.gz
    🍺  /usr/local/Cellar/freetype/2.8: 63 files, 2.6MB
    ==> Installing graphviz dependency: fontconfig
    ==> Downloading https://homebrew.bintray.com/bottles/fontconfig-2.12.3.sierra.bo
    ######################################################################## 100.0%
    ==> Pouring fontconfig-2.12.3.sierra.bottle.1.tar.gz
    ==> Regenerating font cache, this may take a while
    ==> /usr/local/Cellar/fontconfig/2.12.3/bin/fc-cache -frv
    🍺  /usr/local/Cellar/fontconfig/2.12.3: 487 files, 3.1MB
    ==> Installing graphviz dependency: jpeg
    ==> Downloading https://homebrew.bintray.com/bottles/jpeg-8d.sierra.bottle.2.tar
    ######################################################################## 100.0%
    ==> Pouring jpeg-8d.sierra.bottle.2.tar.gz
    🍺  /usr/local/Cellar/jpeg/8d: 19 files, 708.3KB
    ==> Installing graphviz dependency: libtiff
    ==> Downloading https://homebrew.bintray.com/bottles/libtiff-4.0.8.sierra.bottle
    ######################################################################## 100.0%
    ==> Pouring libtiff-4.0.8.sierra.bottle.tar.gz
    🍺  /usr/local/Cellar/libtiff/4.0.8: 245 files, 3.4MB
    ==> Installing graphviz dependency: webp
    ==> Downloading https://homebrew.bintray.com/bottles/webp-0.6.0.sierra.bottle.ta
    ######################################################################## 100.0%
    ==> Pouring webp-0.6.0.sierra.bottle.tar.gz
    🍺  /usr/local/Cellar/webp/0.6.0: 36 files, 2.0MB
    ==> Installing graphviz dependency: gd
    ==> Downloading https://homebrew.bintray.com/bottles/gd-2.2.4_1.sierra.bottle.ta
    ######################################################################## 100.0%
    ==> Pouring gd-2.2.4_1.sierra.bottle.tar.gz
    🍺  /usr/local/Cellar/gd/2.2.4_1: 34 files, 1MB
    ==> Installing graphviz
    ==> Downloading https://homebrew.bintray.com/bottles/graphviz-2.40.1.sierra.bott
    ######################################################################## 100.0%
    ==> Pouring graphviz-2.40.1.sierra.bottle.1.tar.gz
    🍺  /usr/local/Cellar/graphviz/2.40.1: 536 files, 12.9MB
    bogon:~ lpc$ 
    

    网友发现一个问题

    执行 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 libpngbrew install graphviz就会成功了.

    相关链接

    相关文章

      网友评论

          本文标题:Mac 安装 graphviz

          本文链接:https://www.haomeiwen.com/subject/gnuwcxtx.html