How to Install Local Package Using RPM [A Quick Guide]

LINUX
FUNDAMENTALS
A Complete Guide for Beginners Enroll Course Now

RPM, short for Red Hat Package Manager, serves as a primary tool within Red Hat-based distributions like RHEL, Fedora, and CentOS. This package management system facilitates effortless installation, updates, and removals of .rpm software packages within Unix/Linux environments. While YUM and DNF package managers are also prevalent, RPM remains useful for its control over installation. Today I will show you how to install a local .rpm package using the rpm command in Red Hat-based distributions.

To install a local RPM package or file, check the following command:

  1. Using rpm package manager: rpm -i [package_name].rpm
  2. Using yum package manager: yum localinstall [package_name].rpm
  3. Using dnf package manager: dnf localinstall [package_name].rpm

Process Flow Chart to Install Local Package Using RPM

step by step instructions on how to install local package using rpm[Distro Used Throughout the Tutorial: RHEL 9.2]

Steps to Install Local Package Using RPM

Installing a local app package using the rpm package manager is a very simple task in Red Hat-based Linux systems. In this guide, I will navigate you through RPM’s local package installation procedure with 4 easy steps. If you want to know how to list installed packages using rpm check this fantastic article “How to List Installed Packages Using RPM”. For uninstalling an app package using rpm check this another detailed article “How to Uninstall RPM in Linux”. The steps to install local package using rpm is given below:

  1. Before starting, download the .rpm package file for the app you want to install. You can usually find it on the official website of the app or in third-party repositories. You can also create the .rpm file from the .deb file using the alien package.

  2. Now, run the following command in the terminal to move to the directory where the .rpm file is located:
    cd Downloads/
    EXPLANATION
    • cd: This command changes the current directory to the destination directory.
    • Downloads/: Name of the destination directory.
  3. After that, execute the following command to view all the files and folders in that directory:
    ls
    EXPLANATION
    • ls: List all files and folders of the current directory in the command line.
  4. Finally, run the following command to install your app package:
    sudo rpm -i  google-chrome-stable_current_x86_64.rpm
    EXPLANATION
    • sudo: Permits administrative permission.
    • rpm: Manages rpm packages in Red Hat-based distributions.
    • i: This option specifies the rpm command to install the specified app package.
    • google-chrome-stable_current_x86_64.rpm: .rpm file of the app package.

    how to install .rpm local file using rpm package manager in command line interface

    After installing the app package, your command line interface should look like the above image.

Conclusion

In this article, I have discussed the simplest way to install an app package from a local file using RPM in a Red Hat-based system. I hope this article has been helpful and you were able to install a package from a local file in your Linux system.

People Also Ask

How to install RPM local package with yum?

To install a local package in any Red Hat-based Linux system like RHEL, Fedora, and CentOS at first move to the download folder using cd Download/ then run sudo yum localinstall filename.rpm or you can just run sudo yum localinstall path/filename.rpm in the terminal. It will install the local package in your system using the Yum package manager.

How to use yum to install a package?

In Red Hat-based distributions yum is a very dependable package manager. You can keep an up-to-date Linux system using Yum. To install an app package using yum run sudo yum install package-name in the terminal.

How do I list yum installed packages?

To list all installed packages using yum just run yum list installed in your RPM-based distribution.

How to check installed package with RPM?

You can use rpm -qa command to list all installed rpm packages. Or you can use rpm -q package_name to list a particular package.

How to install an RPM package on Cent OS?

To install an RPM package on Cent OS, use the rpm command followed by the -i flag and the RPM’s file name. For instance, to install an RPM package called sample_package.rpm, run the command sudo rpm -i sample_package.rpm.


Related Articles


<< Go Back to Package Installation in Linux | Package Management in Linux | Learn Linux Basics

4.8/5 - (13 votes)
Ridoy Chandra Shil

Hello everyone. I am Ridoy Chandra Shil, currently working as a Linux Content Developer Executive at SOFTEKO. I am a Biomedical Engineering graduate from Bangladesh University of Engineering and Technology. I am a science and tech enthusiast. In my free time, I read articles about new tech and watch documentaries on science-related topics. I am also a big fan of “The Big Bang Theory”. Read Full Bio

Leave a Comment