有人能让我知道如何在Ubuntu中查看包的所有嵌套依赖项?例如,
support@vrni-platform:/tmp$ sudo apt-cache depends hadoop-yarn-resourcemanager
hadoop-yarn-resourcemanager
Depends: hadoop-yarn
support@vrni-platform:/tmp$ sudo apt-cache depends hadoop-yarn
hadoop-yarn
Depends: libc6
Depends: adduser
Depends: bigtop-utils
Depends: hadoop
Depends: avro-libs
Depends: zookeeper
我正在寻找类似下面的东西。有点类似于mvn dependency:tree
hadoop-yarn-resourcemanager
Depends: hadoop-yarn
Depends: libc6
Depends: adduser
Depends: bigtop-utils
Depends: hadoop
Depends: avro-libs
Depends: zookeeper
我见过这个question,但我正在寻找完整的依赖树。
好吧,有apt-cache dotty
命令,它将生成包的依赖关系的graphviz表示。然而,这并没有你想象的那么有用:几乎所有东西都需要很多“核心包”,结果图会非常大。
例如,apt-cache dotty openssh-client
的输出呈现为this beast。
点语法相对简单;您可以自己解析它以提取信息的子集。