yum download dependency package

There are many businesses that need to install software offline, but software dependencies are very troublesome, so use yum to download.

install plugin

yum install yum-plugin-downloadonly
insert image description here

download

yum install --downloadonly --downloaddir=path installation package name
eg:
yum install --downloadonly --downloaddir=/packages/gcc-c++/ gcc
insert image description here

Install

rpm -Uvh --force --nodeps *.rpm
rpm -Uvh *.rpm (recommended)

1. –nodeps means not checking dependencies during installation. For example, your rpm needs A, but you haven’t installed A, so your package cannot be installed. You can install it with –nodeps.
2. –force is to force the installation. For example, if you have installed version 1 of this rpm, if you want to install version 2 of this rpm, you need to use –force to force the installation.

insert image description here

Guess you like

Origin blog.csdn.net/TS_forever007/article/details/129100384