Rpm: Difference between revisions
(new section for querying installed packages) |
m (→Installing a package: fix example formatting) |
||
Line 24: | Line 24: | ||
Generally, you can install a package with 'rpm' like this: |
Generally, you can install a package with 'rpm' like this: |
||
⚫ | |||
su |
|||
⚫ | |||
exit |
|||
That is, you use [[ |
That is, you use [[sudo]] to run a command as "superuser" (or "root"), and the command is 'rpm' to install the software. 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: |
You can also use 'rpm' to both download and install the software package in one step: |
||
⚫ | |||
su |
|||
⚫ | |||
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: |
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 '<nowiki>http:</nowiki>//''www.website.com/path/to/desired_software_package |
wget '<nowiki>http:</nowiki>//''www.website.com/path/to/desired_software_package''.rpm' |
||
⚫ | |||
su |
|||
⚫ | |||
exit |
|||
You can read more about |
You can read more about [[rpm]] at the [http://www.rpm.org/ rpm homepage]. |
||
[[Category:Package management]] [[Category:Linux software]] |
[[Category:Package management]] [[Category:Linux software]] |
Revision as of 22:39, 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:
sudo rpm -ivh 'desired_software_package.rpm'
That is, you use sudo to run a command as "superuser" (or "root"), and the command is 'rpm' to install the software. 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:
sudo rpm -ivh 'http://www.website.com/path/to/desired_software_package.rpm'
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' sudo rpm -ivh 'desired_software_package.rpm'
You can read more about rpm at the rpm homepage.