安装前如何测试rpm包

时间:2019-08-20 17:58:19  来源:igfitidea点击:

在使用'rpm-i'命令安装rpm软件包文件时,可能会出现一些问题。
它可能与依赖性,GPG签名或者损坏的rpm包等问题。

在本教程中,我们将了解如何在安装之前测试rpm软件包。

如何测试rpm包

要在安装前测试rpm包,我们将在“rpm”命令中使用“-test”选项。

这个命令不会安装rpm包,只是测试rpm包。

rpm -ivh --test PACKAGE-NAME.rpm

示例

[root@localhost ~]# rpm -ivh --test epel-release-6-8.noarch.rpm 
Preparing...                ########################################### [100%]
[root@localhost ~]# 
[root@localhost ~]# rpm -qa|grep epel
[root@localhost ~]# 
[root@localhost ~]#