インストールされたrpmパッケージでトポロジソートを実行するには?

インストールされたrpmパッケージでトポロジソートを実行するには?

依存関係に基づいて、Fedoraにインストールされているすべてのrpmパッケージをトポロジでソートしたいと思います。最も必要なパッケージは一番上にあり(glibcなど)、最も必要とされないパッケージは一番下にあります。インストールされているすべてのパッケージを一覧表示できますが、位相が揃ってrpm -qaいないようです。

私の目標は、インストールされているパッケージを確認し、不要になったパッケージを見つけて削除することです。

ベストアンサー1

人間の速度チャート:

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

取付ける:

rpm-devel fedora 19にはこのパッケージがあります

Fedora 30用のrpm-develです。

パッケージマネージャを使用してください。

dnf install rpm-devel

wgetにインストールするには、CentOSターミナルウィンドウに次のように入力します。

sudo yum install wget

wgetにインストールするには、Fedora次のように入力します。

sudo dnf install wget

これで、wgetコマンドを使用して必要な.rpmファイルをダウンロードできます。次のように入力します。

wget http://some_website/sample_file.rpm

システムはウェブサイトにアクセスし、現在の作業ディレクトリにファイルをダウンロードする必要があります。

RPMコマンドを使用したRPMファイルのインストール

FedoraLinux に .rpm パッケージをインストールするには、CentOS次のように入力します。

sudo rpm –i sample_file.rpm

-i スイッチはパッケージマネージャにファイルをインストールすることを通知します。

RPMインストーラの詳細については、次を参照してください。タコメーター文書

Yumを使用したRPMファイルのインストール

または、パッケージマネージャを使用してファイルをyumインストールできます。.rpm

次のように入力します。

sudo yum localinstall sample_file.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。 3つの異なるバージョンのパッケージリストを構文しようとしましたが、PACKAGE_FILEエラーのみが発生します。このプログラムの使い方を知っている場合は、回答を提供するか、私を編集してください。でテストされましたFedora 28.rpm 拡張子を使用してインストールされたすべてのパッケージを一覧表示する方法。 Fedora、Centus、Red Hat

# rpmgraph INSTALLED_PACKAGES 
(null): read manifest failed:

おすすめ記事