• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
sharadchhetri

sharadchhetri

Tutorials On Linux, Unix & Open Source

  • Home
  • Linux Commands
  • Resources
    • Learn Linux
  • My WordPress plugins

How to test rpm package before installation

March 28, 2014 by Sharad Chhetri 2 Comments

In this tutorial we will know, how to test rpm package before installation .You may have seen while installing the rpm package file by using rpm -i command, some problem may occur. It can be issue with dependency,GPG signature or corrupt rpm package etc.

As a Linux System Engineer,this command is very useful and should be in regular practice.
Mostly I use this command,it helps me to know before if there is any issue in rpm package installation.

Note: rpm command available in Red Hat based operating system.

How to test rpm package

To test the rpm package before installation we will use the --test option with rpm command.
The command will not install rpm package but it only test the rpm 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. But here 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.

As well as,you can see there is no error message is 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 ~]# 

Share this:

  • Twitter
  • Facebook
  • More
  • Print
  • Email
  • LinkedIn
  • Reddit
  • Tumblr
  • Pinterest
  • Pocket
  • Telegram
  • WhatsApp
  • Mastodon

Related posts:

  1. How to find installation date and time of rpm package
  2. How to extract RPM package on Linux system
  3. Extract single and selected files from RPM package on Linux
  4. yum : how to find rpm package which has certain command or file
  5. Prevent starting service after package installation on Ubuntu / Debian
  6. grep command to show lines after and before the keyword
  7. linux command to list the files from rpm package without extracting
  8. How to create OpenSSH rpm package and its upgrade
  9. Yum command to download rpm file without installing in linux system
  10. How to add before entry widget in Genesis Child Theme

Filed Under: Linux, Linux Commands Tagged With: linux command, rpm

Reader Interactions

Comments

  1. Paras Pandey says

    October 31, 2018 at 4:40 am

    Thanks .

    Reply
    • Sharad Chhetri says

      November 4, 2018 at 8:29 am

      welcome Paras!

      Regards
      Sharad

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Our Social Media Presence

  • Facebook
  • GitHub
  • Twitter

Linux Command

What is Linux Internal And External Command

Linux Basic Commands With Examples For Every Beginner

tr command to convert lines to space , tab and vertical tab

smbpasswd command not found on CentOS 7 and RHEL 7

Solution : semanage command not found

Unix / Linux : How to print duplicate lines from file

More Posts from this Category

You Might Like These Articles!

simplecodesyntax wordpress plugin

SimpleCodeSyntax : My Another WordPress Plugin

Install Nginx

How To Install Nginx On Ubuntu 22.04 LTS

Install Latest Git package in Ubuntu Operating System

How To Always Install Latest Git Package In Ubuntu Operating System

Bash script for installing VirtualBox on Ubuntu 22.04 LTS Desktop

Install VirtualBox On Ubuntu 22.04 LTS Desktop (Bash Script)

libfuse

dlopen(): error loading libfuse.so.2 – Got Error On Ubuntu

Failed to open/create the internal network

VirtualBox Error: Failed to open/create the internal network

Always Useful Tips And Tricks

How to install korn shell ksh in Linux

How to download package using apt-get command in ubuntu

How to install pam_mysql in CentOS or Red Hat

How to set JAVA environment variables in Linux

This kernel requires an x86-64 CPU but only detected an i686 CPU

error could not configure a c compiler Linux

How to create a file with cat command

Explore 90+ Article On "Linux Tips And Tricks"

Copyright © 2023 ยท
The material in this site cannot be republished either online or offline, without our permission.
Proudly Blogging From Bharat.

  • Contact
  • About Me
  • My WordPress plugins
  • Privacy Policy