Install packages using RPM
Linux

How to Install linux Software Packages using rpm command

0 1100

In this tutorial we will discuss how to install software packages in Linux whether you have package file or download over the internet.
Introduction
We just take a review! Computer software is divided in the systems software and application software. Application software is therefore organized in packages.




What is linux software Packages?

>

A package is basically a file that conceptually contains other files. A package includes one executable. When Linux developers create their software they typically bundle all the executable and data files into a single file called a package file. Packages have different formats. For Example; .RPM, .apk, .deb, etc

We discuss RPM (RedHat Package Manager) which is introduce by RedHat and has been adopted by many other distros (Like Fedora etc).

RPM command is used for installing, uninstalling, upgrading, querying, listing, and checking RPM packages on your Linux system. We need to be on root when install a package, we can use the rpm command with appropriate options to manage the RPM software packages.

Installing a RPM package

RPM filename has packagename, version, and release and architecture name.

For example, in the tigervnc-1.3.1-3.el7.x86_64.rpm

  • Tigervnc – Package Name
  • 3.1 – Version
  • el7  – Release
  • x86_64  – Architecture

RPM commands and Options




Install rpm package using rpm –ivh tigervnc-1.3.1-3.el7.x86_64.rpm

  • i – Install
  • v – verbose (provide additional details)
  • h – Print hash (#) sign as the package archive is unpacked. See below image;

1

In GUI we can see the package install click on application from taskbar dropdown list will open then move pointer to internet and on the right side we can see as shown in below image;

2

Query a particular RPM package using rpm –q tigervnc

Query a package  we should specify the exact package name after installation to check the installation we can query a particular package and verify as shown below;

3

Query all installed packages using rpm –qa (a – all install packages)

It shows all packages installed in system.

4

Information about installed package using rpm –qi tigervnc

5

List all the file of package using rpm –qlp tigervnc-1.3.1-3.el7.x86_64.rpm

6

Upgrade package using rpm –Uvh tigervnc-1.3.1-3.el7.x86_64.rpm

7

Now we have a file and want to check that file belongs to which package then we use rpm –qf filename here I am using lib file  as shown below;

8

Erase a package using rpm –e tigervnc-1.3.1-3.el7.x86_64.rpm

9

Note: some of packages have dependencies file first we need to install that dependencies file then install the package file.

Thanks

SUBSCRIBE OUR NEWSLETTER
Join us by subscribing to our newsletter and learn IT subjects for free
We hate spam. Your email address will not be sold or shared with anyone else.

Leave a reply

You must be logged in to post a comment.