rpmgraph(8) - Linux man page
Name
rpmgraph - Display RPM Package Dependency Graph
Synopsis
rpmgraph PACKAGE_FILE ...
Description
rpmgraph uses PACKAGE_FILE arguments to generate a package dependency graph. Each
PACKAGE_FILE argument is read and added to an rpm transaction set. The elements
of the transaction set
are partially ordered using a topological sort.
The partially ordered elements are then printed to standard output.
Nodes in the dependency graph are package names, and edges in the directed graph
point to the parent of each node. The parent node is defined as the last
predecessor of a package when partially ordered using the package dependencies as
a relation. That means that the parent of a given package is the package's last
prerequisite.
The output is in dot(1) directed graph format, and can be displayed or printed
using the dotty graph editor from the graphviz package. There are no rpmgraph
specific options, only common rpm options. See the rpmgraph usage message for
what is currently implemented.
[1]: https://linux.die.net/man/8/rpmgraph
#!/usr/bin/perl
use strict;
use warnings;
use 5.10.0;
use Data::Dumper;
# a leaf RPM is one that has no deps and you can safely delete
# run it as is, delete any that you think are useless
my @installed = `rpm -qa --queryformat="%{NAME}\n"`;
chomp(@installed);
my %count;
@ARGV = ("dnf repograph |");
while (<>) {
chomp;
next if /^digraph packages/;
next unless m({) .. m(});
next if m({) or m(});
s/"//g;
$count{$_}++;
}
# print Dumper \@installed;
# print Dumper \@all;
# print Dumper \%count;
# print "----\n";
my %dup;
for my $k (sort @installed) {
next if $dup{$k}++;
print "$k\n" unless exists $count{$k};
}
人rpm图:
安装:
rpm-devel fedora 19 有这个包
这是 Fedora 30 的 rpm-devel
使用你的包管理器:
要在 中安装,请
wget
在CentOS
终端窗口中输入以下内容:要安装
wget
在 中Fedora
,请输入以下内容:现在,您可以使用 wget 命令下载所需的 .rpm 文件。输入以下内容:
系统应访问网站并将文件下载到您当前的工作目录。
使用 RPM 命令安装 RPM 文件
Fedora
要在 Linux或Linux中安装 .rpm 包CentOS
,请输入以下内容:–i 开关告诉包管理器您要安装该文件。
有关 RPM 安装程序的更多信息可以在RPM 文档中找到。
使用 Yum 安装 RPM 文件
或者,您可以使用
yum
包管理器来安装.rpm
文件。输入以下内容:
该
localinstall
选项指示 yum 查看安装文件的当前工作目录。https://superuser.com/questions/483307/how-do-i-know-dependent-rpms-of-aa-package
https://phoenixnap.com/kb/how-to-install-rpm-file-centos-linux
https://linux.die.net/man/8/rpm
编辑:
我无法开始
rpmgraph
工作,我尝试了三种不同版本的PACKAGE_FILE
包列表语法,但它只是给出错误,如果你知道如何使用这个程序,请提供答案或编辑我的。经测试Fedora 28
。如何列出所有已安装的扩展名为 .rpm 的软件包。Fedora、Centos、红帽经过一番搜索,似乎包中的
rpmdep
工具rpmorphan
最接近我想要的。要查看最需要的已安装软件包,可以使用以下--depending
选项运行它:我曾经为此编写了一个脚本,但我几乎没有使用过它。
我会小心处理搬迁。我曾经试图删除一个名为“SimplyHTML”的包,因为它是作为“叶节点”出现的,当我去删除它时,发现“freemind”(我经常使用的思维导图工具)需要它并得到也删了。很奇怪!
无论如何,FWIW 这是脚本(在我的系统上称为“leaf-rpms”):