安装Graphviz后无法执行dot命令。 (没有布局引擎支持“点”)

问题描述 投票:0回答:2

我正在 Ubuntu 系统上工作并安装了 Graphviz 库:

sudo apt install graphviz

当我运行 dot 命令时,默认情况下会附带 dot,它给了我:

There is no layout engine support for "dot"
Perhaps "dot -c" needs to be run (with installer's privileges) to register the plugins?

或者当我运行整个命令时:

dot -Tsvg test.gv -O

这会产生以下错误:

Format: "svg" not recognized. No formats found.
Perhaps "dot -c" needs to be run (with installer's privileges) to register the plugins?

我尝试了终端中给出的命令 dot -c/sudo dot -c 但对我不起作用。另外,搜索它的解决方案,最终得到相同的答案,即使用 dot -c

我尝试重新安装几次,但最终出现相同的错误。我之前也用过 Graphviz,没有任何问题。不知道这次有没有漏掉什么。

那么,我该如何解决这个问题?

graphviz
2个回答
1
投票

无论如何,我在 MacOS 上使用 homebrew 安装 graphviz 时遇到了“完全相同”的错误。这个问题似乎是由缺少依赖项引起的,尽管对于到底缺少什么没有很好的反馈。 这些命令(同样,Mac - 不是您的平台,但上下文可能会有所帮助)为我解决了这个问题:

brew install libtool brew link libtool brew install graphviz brew link --overwrite graphviz

具体来说,我认为 libtool 未正确安装/链接。


0
投票

There is no layout engine support for "dot" Perhaps "dot -c" needs to be run (with installer's privileges) to register the plugins?

dot - graphviz 版本 9.0.0 (0)

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.