Graphviz Dot无法删除由于缺少库而导致的重叠

时间:2015-06-28 15:27:59

标签: command-line homebrew graphviz dot

我正在尝试从命令行运行以下dot命令:

dot -v ~/Documents/FlowGraph/dot_sample_1_full.dot -Tpng 'Documents/FlowGraph/sampleOutput.png' -Ksfdp -Goverlap=false

但是输出失败了:

dot - graphviz version 2.36.0 (20140111.2315)
Using render: cairo:cairo
Using device: png:cairo:cairo
libdir = "/usr/local/lib/graphviz"
Activated plugin library: libgvplugin_neato_layout.6.dylib
Using layout: sfdp:neato_layout
The plugin configuration file:
    /usr/local/lib/graphviz/config6
        was successfully loaded.
    render  :  cairo dot fig map pic pov ps quartz svg tk vml xdot
    layout  :  circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
    textlayout  :  textlayout
    device  :  bmp canon cgimage cmap cmapx cmapx_np dot eps exr fig gif gv icns ico imap imap_np ismap jp2 jpe jpeg jpg pct pdf pic pict plain plain-ext png pov ps ps2 psd sgi svg svgz tga tif tiff tk vml vmlz x11 xdot xdot1.2 xdot1.4 xlib
    loadimage   :  (lib) bmp eps gif jpe jpeg jpg pdf png ps svg
fontname: "Times-Roman" resolved to: (ps:pango  Times,  REGULAR) (PangoCairoCoreTextFont) "Times" 
  margin 8
pack info:
  mode   node
  size   0
  flags  0
ctrl->overlap=-1
Error: remove_overlap: Graphviz not built with triangulation library

我用Google搜索并找到了this thread,其中暗示:

  

必须在graphivz之前安装gts所以输入&sudo brew remove   graphviz的'删除graphivz和&#su; brew install gts'和&#sudo   安装graphivz'用gts安装graphivz。

但这似乎不起作用。我仍然得到错误,所以要么我做得不对,要么对我来说不是解决方案。

如何将三角测量库添加到graphviz?

2 个答案:

答案 0 :(得分:12)

我在使用sfdp的macOS上遇到了类似的问题,以下是解决它的问题。

$ brew uninstall graphviz  
$ brew install gts 
$ brew install --with-gts graphviz

答案 1 :(得分:0)

Homebrew不再支持命令行安装选项,因此先前的答案将不再起作用。

但是,偶然发现我删除了graphviz,安装了gts,然后安装了graphviz。似乎graphviz如果未安装,将使用gts,但由于某种原因,它不是依赖项。

brew remove graphviz brew install gts brew install graphviz