Rpm: Difference between revisions

From OLPC
Jump to navigation Jump to search
m (better intro)
(new section for querying installed packages)
Line 1: Line 1:
'rpm' is a command-line utility for downloading, installing, and managing software packages that you run in the [[Terminal Activity]]. It is generally better to install packages via the [[yum]] utility, but not all software is available this way, so sometimes 'rpm' is the best option. If you are using 'rpm' to download software, the XO will need [[Wifi_Connectivity]].
'rpm' is a command-line utility for downloading, installing, and managing software packages that you run in the [[Terminal Activity]]. It is generally better to install packages via the [[yum]] utility, but not all software is available this way, so sometimes 'rpm' is the best option. If you are using 'rpm' to download software, the XO will need [[Wifi_Connectivity]].

== Querying installed packages ==
rpm is useful to determine what software is installed on the XO, and why.

rpm -q ''package''
displays information about a package, but you have to know the package. So it's easier to query all packages and search for a string:
rpm -qa | grep 'part of name''

Then you can use <tt>rpm -q</tt> for basic information about a package

'''Example'''

There's an [[evince]] library for document viewing, does the XO use it?
rpm -qa | grep evince
sugar-evince-2.20.1.1-3.olpc3.i386
sugar-evince-python-2.20.1.1-3.olpc3.i386




== Installing a package==


Generally, you can install a package with 'rpm' like this:
Generally, you can install a package with 'rpm' like this:
Line 17: Line 38:
Sometimes 'rpm' has problems downloading the software package. You can try using [[wget]] to download the file, as it can sometimes download files that 'rpm' cannot:
Sometimes 'rpm' has problems downloading the software package. You can try using [[wget]] to download the file, as it can sometimes download files that 'rpm' cannot:


wget 'http://www.website.com/path/to/desired_software_package.rpm'
wget '<nowiki>http:</nowiki>//''www.website.com/path/to/desired_software_package.rpm'''
su
su
rpm -ivh 'desired_software_package.rpm'
rpm -ivh 'desired_software_package.rpm'

Revision as of 22:27, 14 August 2008

'rpm' is a command-line utility for downloading, installing, and managing software packages that you run in the Terminal Activity. It is generally better to install packages via the yum utility, but not all software is available this way, so sometimes 'rpm' is the best option. If you are using 'rpm' to download software, the XO will need Wifi_Connectivity.

Querying installed packages

rpm is useful to determine what software is installed on the XO, and why.

rpm -q package

displays information about a package, but you have to know the package. So it's easier to query all packages and search for a string:

rpm -qa | grep 'part of name

Then you can use rpm -q for basic information about a package

Example

There's an evince library for document viewing, does the XO use it?

 rpm -qa | grep evince
 sugar-evince-2.20.1.1-3.olpc3.i386
 sugar-evince-python-2.20.1.1-3.olpc3.i386



Installing a package

Generally, you can install a package with 'rpm' like this:

su
rpm -ivh 'desired_software_package.rpm'
exit

That is, you use su to switch to "superuser" (or "root") mode, 'rpm' to install the software, then 'exit' from "superuser" mode. Note the single-quote characters (') around the filename. They are optional, but may be needed if the filename contains spaces or unusual characters.

You can also use 'rpm' to both download and install the software package in one step:

su
rpm -ivh 'http://www.website.com/path/to/desired_software_package.rpm'
exit

Sometimes 'rpm' has problems downloading the software package. You can try using wget to download the file, as it can sometimes download files that 'rpm' cannot:

wget 'http://www.website.com/path/to/desired_software_package.rpm'
su
rpm -ivh 'desired_software_package.rpm'
exit

You can read more about 'rpm' at the rpm homepage.