BIP KB:
How To Test A RPM Package Before Installation

Article By frank


img

rpm package commands for VPS

Introduction to Linux rpm package manager

In this tutorial we will show you, how to test a rpm package before installation.

As a Linux System Engineer, this command is very useful and should be used in regular practice.

Mostly of the time I use this command, to help me see if there are any issues before installation.

Note: rpm command is available for Red Hat based operating system.

How to test rpm

To test the rpm package before installation we will use the --test option with rpm command.

The command will not install rpm but it will only test the package.

Syntax:

Replace the PACKAGE-NAME.rpm with actual rpm package name in your system.

rpm -ivh --test PACKAGE-NAME.rpm

Example: In this example, we are testing epel-release-6-8.noarch.rpm file. It will not install this file.

By using rpm -qa|grep epel , we are verifying if epel-release-6-8.noarch.rpm is installed. Blank output shows ,epel-release-6-8.noarch.rpm is not installed.

You can see there is no error message shown. Hence, we can install epel-release-6-8.noarch.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 ~]# 



Tags: , , ,

Spin up a VPS server in no time flat

Simple setup. Full root access. Straightforward pricing.

DEPLOY VPS SERVER

Leave a Reply



Feedbacks