只下载yum源的rpm包,例如:yum install ntp --downloadonly ,rpm包路径 /var/cache/yum/x86_64/7/base/packages/

本文介绍如何仅下载YUM源中的RPM包而不进行安装,通过使用yum命令加--downloadonly参数实现,下载的RPM包将保存在/var/cache/yum/x86_64/7/base/packages/目录下。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

只下载yum源的rpm包,例如:yum install ntp --downloadonly  ,rpm包路径 /var/cache/yum/x86_64/7/base/packages/
[root@node1 yum.repos.d]# yum list | grep leatherman leatherman.x86_64 1.10.0-1.el7 @epel leatherman-devel.x86_64 1.10.0-1.el7 epel [root@node1 yum.repos.d]# facter -p facter: error while loading shared libraries: leatherman_curl.so.1.3.0: cannot open shared object file: No such file or directory [root@node1 yum.repos.d]# yum downgrade leatherman Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com Resolving Dependencies --> Running transaction check ---> Package leatherman.x86_64 0:1.3.0-9.el7 will be a downgrade --> Processing Dependency: libboost_log.so.1.59.0()(64bit) for package: leatherman-1.3.0-9.el7.x86_64 --> Processing Dependency: libboost_log_setup.so.1.59.0()(64bit) for package: leatherman-1.3.0-9.el7.x86_64 ---> Package leatherman.x86_64 0:1.10.0-1.el7 will be erased --> Running transaction check ---> Package boost159-log.x86_64 0:1.59.0-2.el7.1 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================ Package Arch Version Repository Size ================================================================================================================ Downgrading: leatherman x86_64 1.3.0-9.el7 openstack-vault 347 k Installing for dependencies: boost159-log x86_64 1.59.0-2.el7.1 openstack-vault 380 k Transaction Summary ================================================================================================================ Install ( 1 Dependent package) Downgrade 1 Package Total download size: 727 k Is this ok [y/d/N]: y Downloading packages: warning: /var/cache/yum/x86_64/7/openstack-vault/packages/boost159-log-1.59.0-2.el7.1.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 764429e6: NOKEY Public key for boost159-log-1.59.0-2.el7.1.x86_64.rpm is not installed (1/2): boost159-log-1.59.0-2.el7.1.x86_64.rpm | 380 kB 00:00:03 (2/2): leatherman-1.3.0-9.el7.x86_64.rpm | 347 kB 00:00:04 ---------------------------------------------------------------------------------------------------------------- Total 157 kB/s | 727 kB 00:00:04 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 The GPG keys listed for the "CentOS-7 - OpenStack train (Vault)" repository are already installed but they are not correct for this package. Check that the correct key URLs are configured for this repository. Failing package is: leatherman-1.3.0-9.el7.x86_64 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
06-17
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值