Sh - RPM package (RPM: Red Hat Package Manager)
Table of Contents
1 - About
RPM packages are
.cpio files and you can unpack their contents.
The Red Hat Package Manager (RPM) is a toolset used to build and manage software packages on UNIX systems. Distributed with the Red Hat Linux distribution and its derivatives (CentOS is 100% compatible rebuild of the Rehat Enterprise Linux).
The rpm files represent application or package that you can install on Linux system.
If you don't have them, you can find them via rpmfind
They are managed through:
- or the rpm tool (outdated ?)
2 - Articles Related
3 - Package naming scheme
The naming scheme of RPM files is itself a standardized convention. RPMs have the format
For example, the name cat-2.4-7.i386.rpm would mean an RPM :
- for the utility “cat”
- version 2.4, build 7
- for the x86 (When the platform name is replaced by “src”, it's a source RPM)
4 - How to
4.1 - install them
4.1.1 - With the shell
# with ''rpm'' rpm -ivh myRpm.rpm # same as yum localinstall myRpm.rpm
Remotely via repo: Example on how to install Samba
rpm -i samba* > Output: error: Failed dependencies: perl(Convert::ASN1) is needed by samba-3.0.33-3.7.el5.i386 rpm -i samba-3.0.33-3.7.el5.i386 > Output: error: open of samba-3.0.33-3.7.el5.i386 failed: No such file or directory rpm -i samba* package samba-common-3.0.33-3.7.el5.i386 is already installed package samba-client-3.0.33-3.7.el5.i386 is already installed
4.1.2 - Gnome gui
On Red Hat / Oracle Entreprise Linux
With the Gnome gui
4.2 - unzip them (install them user scope)
RPM packages are
.cpio files, and you can unpack their contents with the cpio utility.
rpm2cpio my.rpm | cpio -idv
4.3 - see if a package is already installed ?
An interesting command for checking if a package is installed or to find out all packages that match a string is:
rpm -qa | grep -i python
- q = query
- a = all
4.4 - deinstall a package ?
From the command above, take the package name (without the architecture and rpm extension) and perform the following command
rpm -e package
- e = erase
4.5 - Documentation Location
The location of the documentation for installed packages is:
For example, the documentation for the redhat-config-date software package is located in
4.6 - List
List a package or groups of packages
4.7 - Info
yum info python
Loaded plugins: rhnplugin, security This system is not registered with ULN. ULN support will be disabled. Installed Packages Name : python Arch : x86_64 Version : 2.4.3 Release : 56.el5 Size : 73 k Repo : installed Summary : An interpreted, interactive, object-oriented programming language. URL : http://www.python.org/ License : PSF - see LICENSE Description: Python is an interpreted, interactive, object-oriented programming : language often compared to Tcl, Perl, Scheme or Java. Python includes : modules, classes, exceptions, very high level dynamic data types and : dynamic typing. Python supports interfaces to many system calls and : libraries, as well as to various windowing systems (X11, Motif, Tk, : Mac and MFC). : : Programmers can write new built-in modules for Python in C or C++. : Python can be used as an extension language for applications that need : a programmable interface. This package contains most of the standard : Python modules, as well as modules for interfacing to the Tix widget : set for Tk and RPM. : : Note that documentation for Python is provided in the python-docs : package.
4.8 - Find / provide
Find what package provides the given value
yum provides *GLIBCXX_3.4.8*
libstdc++-4.1.2-50.el5.i386 : GNU Standard C++ Library Repo : ol5_u6_base Matched from: Other : libstdc++.so.6(GLIBCXX_3.4.8)