【问题标题】:Unable to execute dot command after installation of Graphviz. (There is no layout engine support for "dot")安装 Graphviz 后无法执行 dot 命令。 (“点”没有布局引擎支持)
【发布时间】:2022-03-01 23:49:14
【问题描述】:

我正在使用 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,没有任何问题。不知道这次是不是漏了什么。

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

【问题讨论】:

  • 这似乎是安装后的错误。我认为这个问题最常出现在 Windows 系统上。这是 Linux 系统上的“最佳”示例,它来自 2010 年 - bugs.debian.org/cgi-bin/bugreport.cgi?bug=575797。你试过 sudo apt purge graphviz; sudo apt install graphviz
  • 是的,很多次。
  • 是否有任何“有用”的 apt 错误消息?
  • 安装时没有错误。

标签: graphviz


【解决方案1】:

对于它的价值,我在使用自制软件安装 graphviz 的 MacOS 上遇到了 exact 相同的错误。看起来这个问题是由缺少依赖引起的,尽管没有关于究竟缺少什么的良好反馈。

这些命令(同样,Mac - 不是您的平台,但上下文可能会有所帮助)为我修复了它:

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

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

【讨论】:

  • 什么版本的 Ubuntu? (lsb_release -a)
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2019-09-11
  • 1970-01-01
  • 1970-01-01
  • 2019-12-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多