How to check RPM package dependencies in Fedora, CentOS, and RHEL

Source: Internet
Author: User
We all know that in a red hat-based Linux system, an RPM package must be installed with other packages that it depends on before it can work properly. For end users, the dependencies in RPM installation, update, and deletion have been transparent by tools (such as yum or DNF ). However, if you are a system administrator or RPM package administrator, You need to familiarize yourself with the dependency of the RPM package so that you can update and delete the appropriate package in time to ensure the normal operation of the system. In this tutorial, I will teach you how to check the dependency of the RPM package. Whether or not this package is installed

We all know that in a red hat-based Linux system, an RPM package must be installed with other packages that it depends on before it can work properly. For end users, the dependencies in RPM installation, update, and deletion have been transparent by tools (such as yum or DNF ). However, if you are a system administrator or RPM package administrator, You need to familiarize yourself with the dependency of the RPM package so that you can update and delete the appropriate package in time to ensure the normal operation of the system.

In this tutorial, I will teach you howHow to check the dependency of the RPM package. Whether or not the package has been installed in the operating system, we have some ways to check their dependencies.

Make your own rpm pack http://www.linuxidc.com/Linux/2013-06/86435.htm

Directory structure and some configuration http://www.linuxidc.com/Linux/2013-06/85761.htm after rpm installation in Linux

Brief Introduction to rpm and yum and demo http://www.linuxidc.com/Linux/2013-05/84480.htm

RedHat Linux --- rpm command details http://www.linuxidc.com/Linux/2013-03/81971.htm

Method 1

Use the RPM command to list all packages that the target package depends on, as shown in the following code: $ rpm-qR

Note that this method only appliesInstalled. If you need to checkNot InstalledPackage dependency, you first need to download this package to the local device (no installation required ).

To download an RPM package without installation, you can use a tool called 'yumdownloader'. Next we will first install yumdownloader:

  1. $ Sudo yum install yum-utils

Now let's check the dependency of an uninstalled RPM package (tcpdump is used in this example ). First, we use yumdownloader to download the RPM package of tcpdump.

  1. $ Yumdownloader -- destdir =. tcpdump

Then, use the "-qpR" parameter to display the dependency of the package.

  1. # Rpm-qpR tcpdump-4.4.0-2.fc19.i686.rpm
Method 2

You can use the repoquery tool to list the dependencies of a package. It has nothing to do with whether the package is installed. This toolkit is included in yum-utils.

  1. $ Sudo yum install yum-utils

Show the packages that the target package depends on:

  1. $ Repoquery -- requires -- resolve

To make the repoquery work normally, you need to ensure that the Network is smooth. The repoquery needs to find information in the Yum database.

Method 3

The third method is to use the rpmreaper tool. This tool was originally used to clean up useless and dependent packages in the system. rpmreaper has a very intuitive ncurses interface to display the tree trees of installed packages and their dependencies.

Install rpmrepater. In CentOS, you must set the EPEL Library first.

  1. $ Sudo yum install rpmreaper

Run rpmreaper to view the dependency of the RPM package:

  1. $ Rpmreaper

Rpmrepater displays the list of installed packages. You can use the up/down arrow to scroll the screen.

You can use the "r" key on the specified package to display its dependency, and repeatedly press the "r" key on the specified package to display the remaining information.

"L" indicates that this package is a piece of "solitary leaf", meaning that no package depends on it.

"O" indicates that this package is the middle part of the entire dependency chain.

Press the "B" key to display other packages dependent on the package.

For more details, refer to the highlights on the next page.: Http://www.linuxidc.com/Linux/2014-08/105626p2.htm

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.