≡ Menu

Linux Install an RPM File

I'm a new Linux system administrator and wanted to perform software installation and maintenance. I've downloaded a file called awstats.i386.rpm and how do I install it under CentOS / RHEL / Suse / Fedora / Redhat Linux?

RPM is nothing but a a package management system. To install an rpm file, open a terminal and then type the following command:

 
rpm -ivh .rpm.file-name
 

Please note that you need to log in as root, or use the su command to change to the root user to install the software using rpm command:
$ su -

Install RPM File

To install an rpm file called awstats.i386.rpm, enter:
# rpm -ivh awstats.i386.rpm
Note: you can download the package in rpm format from the official project web pages or public ftp servers.

Upgrade RPM File

Type the following command:
# rpm -Uvh awstats.i386.rpm
If you are upgrading from an earlier version of the software package, use upgrade mode command as described above.

Erase (Delete) RPM File (package)

Type the following command:
# rpm -ev packagename
To find list of all install packages, enter:
# rpm -qa
# rpm -qa | less
# rpm -qa | grep something

Sample outputs:

comps-extras-11.1-1.1
libattr-2.4.32-1.1
libidn-0.6.5-1.1
grep-2.5.1-55.el5
libxslt-1.1.17-2.el5_2.2
perl-Digest-SHA1-2.11-1.2.1
time-1.7-27.2.2
libdaemon-0.10-5.el5
....
.....
..
mysql-server-5.0.77-4.el5_5.5
mysql-devel-5.0.77-4.el5_5.5
samba-client-3.0.33-3.29.el5_6.2
pcre-6.6-6.el5_6.1
yum-rhn-plugin-0.5.4-17.el5_6.1
libtiff-3.8.2-7.el5_6.7
nash-5.1.19.6-68.el5_6.1
quota-3.13-5.el5
xorg-x11-server-Xorg-1.1.1-48.76.el5_6.4
xorg-x11-server-Xnest-1.1.1-48.76.el5_6.4

To remove samba-client-3.0.33-3.29.el5_6.2, enter:
# rpm -ev samba-client-3.0.33-3.29.el5_6.2
See our rpm command cheat sheet for more information or read the man page:
$ man rpm

A Note About yum Command

The yum command act as an interactive, rpm based, package manager. It can automatically perform system updates and install or remove packages. It is recommended that you use the yum command as described here for package management.

Tweet itFacebook itGoogle+ itPDF itFound an error/typo on this page?

{ 4 comments… add one }

  • Alex May 10, 2011, 11:47 am

    Use yum to install local rpms with dependenices:
    #yum localinstall /path/to/local/packet.name.rpm

  • Lyn May 23, 2013, 11:47 am

    Hi Vivek,

    # rpm -e rpm-4.8.0-19.el6.x86_64

    How to reinstall rpm rpm if we have uninstalled it by mistake ?? Pls let me know ???

  • Ntombie September 2, 2013, 9:44 am

    I am trying to install the rpm packages and this is the error I get.. Can someone please assist on what could the problem be. See below the error log I get

    [root@localhost ~]# rpm -ivh /home/subversion-1.4.3-2mdv2007.1.i586.rpm
    warning: /home/subversion-1.4.3-2mdv2007.1.i586.rpm: Header V3 DSA/SHA1 Signature, key ID 70771ff3: NOKEY
    error: Failed dependencies:
            libsvn0 = 1.4.3 is needed by subversion-1.4.3-2mdv2007.1.i586
            perl-base is needed by subversion-1.4.3-2mdv2007.1.i586
            libapr-1.so.0 is needed by subversion-1.4.3-2mdv2007.1.i586
            libaprutil-1.so.0 is needed by subversion-1.4.3-2mdv2007.1.i586
            libc.so.6 is needed by subversion-1.4.3-2mdv2007.1.i586
            libc.so.6(GLIBC_2.0) is needed by subversion-1.4.3-2mdv2007.1.i586
            libc.so.6(GLIBC_2.3) is needed by subversion-1.4.3-2mdv2007.1.i586
            libcom_err.so.2 is needed by subversion-1.4.3-2mdv2007.1.i586
            libcrypt.so.1 is needed by subversion-1.4.3-2mdv2007.1.i586
            libcrypto.so.0.9.8 is needed by subversion-1.4.3-2mdv2007.1.i586
            libdb-4.2.so is needed by subversion-1.4.3-2mdv2007.1.i586
            libdl.so.2 is needed by subversion-1.4.3-2mdv2007.1.i586
            libexpat.so.0 is needed by subversion-1.4.3-2mdv2007.1.i586
            libgssapi_krb5.so.2 is needed by subversion-1.4.3-2mdv2007.1.i586
            libk5crypto.so.3 is needed by subversion-1.4.3-2mdv2007.1.i586
            libkrb5.so.3 is needed by subversion-1.4.3-2mdv2007.1.i586
            liblber-2.3.so.0 is needed by subversion-1.4.3-2mdv2007.1.i586
            libldap-2.3.so.0 is needed by subversion-1.4.3-2mdv2007.1.i586
            libm.so.6 is needed by subversion-1.4.3-2mdv2007.1.i586
            libneon.so.26 is needed by subversion-1.4.3-2mdv2007.1.i586
            libpthread.so.0 is needed by subversion-1.4.3-2mdv2007.1.i586
            libpthread.so.0(GLIBC_2.0) is needed by subversion-1.4.3-2mdv2007.1.i586
            libresolv.so.2 is needed by subversion-1.4.3-2mdv2007.1.i586
            libsasl2.so.2 is needed by subversion-1.4.3-2mdv2007.1.i586
            libssl.so.0.9.8 is needed by subversion-1.4.3-2mdv2007.1.i586
            libsvn_client-1.so.0 is needed by subversion-1.4.3-2mdv2007.1.i586
            libsvn_delta-1.so.0 is needed by subversion-1.4.3-2mdv2007.1.i586
            libsvn_diff-1.so.0 is needed by subversion-1.4.3-2mdv2007.1.i586
            libsvn_fs-1.so.0 is needed by subversion-1.4.3-2mdv2007.1.i586
            libsvn_fs_base-1.so.0 is needed by subversion-1.4.3-2mdv2007.1.i586
            libsvn_fs_fs-1.so.0 is needed by subversion-1.4.3-2mdv2007.1.i586
            libsvn_ra-1.so.0 is needed by subversion-1.4.3-2mdv2007.1.i586
            libsvn_ra_dav-1.so.0 is needed by subversion-1.4.3-2mdv2007.1.i586
            libsvn_ra_local-1.so.0 is needed by subversion-1.4.3-2mdv2007.1.i586
            libsvn_ra_svn-1.so.0 is needed by subversion-1.4.3-2mdv2007.1.i586
            libsvn_repos-1.so.0 is needed by subversion-1.4.3-2mdv2007.1.i586
            libsvn_subr-1.so.0 is needed by subversion-1.4.3-2mdv2007.1.i586
            libsvn_wc-1.so.0 is needed by subversion-1.4.3-2mdv2007.1.i586
            libxml2.so.2 is needed by subversion-1.4.3-2mdv2007.1.i586
            libz.so.1 is needed by subversion-1.4.3-2mdv2007.1.i586
            perl(URI) >= 1.17 is needed by subversion-1.4.3-2mdv2007.1.i586
    
  • vignesh June 18, 2014, 8:56 am

    I am facing issue while installing glibc 2.4.rpm in my red hat device as shown below
    [root@vm-rh4-64 ~]# cd glibc
    [root@vm-rh4-64 glibc]# ls
    glibc-2.4-8mdv2007.1.x86_64.rpm glibc-2.4.tar.gz
    [root@vm-rh4-64 glibc]# rpm -i glibc-2.4-8mdv2007.1.x86_64.rpm
    warning: glibc-2.4-8mdv2007.1.x86_64.rpm: V3 DSA signature: NOKEY, key ID 70771ff3
    error: Failed dependencies:
    glibc > 2.3.4 conflicts with glibc-common-2.3.4-2.39.x86_64
    [root@vm-rh4-64 glibc]#

    Can some one help me to update GLIBC 2.4 in my device now i m using GLIBC2.3.4

Leave a Comment