How to Use Yum to download and install the RPM package and its dependencies, and use yumrpm Dependencies

Source: Internet
Author: User

How to Use Yum to download and install the RPM package and its dependencies, and use yumrpm Dependencies

Today, when installing Perl-IPC-cmd, we found many dependencies.

Run Yum install? Perl-IPC-cmd looks like this:

Updating: glibc-common-2.17-196.el7_4.2.x86_64 1/22 updating: glibc-2.17-196.el7_4.2.x86_64 2/22 updating: libdb-5.3.21-21.el7_4.x86_64 3/22 installing: libdb-devel-5.3.21-21.el7_4.x86_64 4/22 installing: kernel-headers-3.10.0-693.21.1.el7.x86_64 5/22 installing: glibc-headers-2.17-196.el7_4.2.x86_64 6/22 installing: glibc-devel-2.17-196.el7_4.2.x86_64 7/22 installing: gdbm-devel-1.10-8.el7.x86_64 8/22 installing: pyparsing-1.5.6-9.el7.noarch 9/22 installing: systemtap-sdt-devel-3.1-5.el7_4.x86_64 10/22 installing: 1: perl-ExtUtils-ParseXS-3.18-3.el7.noarch 11/22 installing: perl-ExtUtils-MakeMaker-6.68-3.el7.noarch 12/22 installing: perl-ExtUtils-Install-1.58-292.el7.noarch 13/22 installing: 4: perl-devel-5.16.3-292.el7.x86_64 14/22 installing: 1: perl-IPC-Cmd-0.80-4.el7.noarch 15/22 updating: libdb-utils-5.3.21-21.el7_4.x86_64 16/22 updating: glibc-2.17-196.el7_4.2.i686 17/22

Due to the need for batch installation for others, the user environment may not have a network and requires your own rpm.

The following describes my steps:

Download RPM package

Run Yum install? Perl-IPC-cmd

The download list is displayed and the message "Y/D/N" is displayed]

Select D here. D indicates only downloading and not installing. It will be downloaded to the corresponding location of the/var/Cache/Yum/x86_64/7/directory.

Install the RPM package

Run the/var/Cache/Yum/x86_64/7/upgrades/packages command to store the software package to be upgraded. Here I am manually executing rpm-IVH? Packagename finds that there is mutual dependency, and it is difficult to solve the dependency between them. You only need to execute

 
Rpm-uvh *
The dependency between them is automatically resolved.

Run/var/Cache/Yum/x86_64/7/base/packages to store the software package to be installed.

 
Rpm-IVH *

The dependency is automatically resolved.

Method Summary
 
Yum install -- downloadonly -- downloaddir =/tmp/RPM Perl-IPC-cmd

Download all the required installation packages and their dependencies to the/RMP/RPM directory, copy the entire directory, and transmit it to the machine to be installed through SFTP. Execute

Rpm-IVH * Everything is automatically solved! (This method cannot be used in this example because of upgrade and install)

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.