Installing software using Urpmi

From Mandrivausers Wiki

Jump to: navigation, search

Urpmi is the Mandriva Linux command line package management tool. Its basic job is to install and remove RPMs. There is also a graphical tool to easily install, uninstall and update software in Mandriva. It is called rpmdrake and can be accessed through the Mandriva Control Center. Rpmdrake has all the functions urpmi and uprme have.

Contents

[edit] Basic command line use

To use urpmi for installation, open a console and su to root, then:

[root@localhost]# urpmi program

for example:

[root@localhost]# urpmi xmms

To uninstall programs with urpmi use the urpme command:

[root@localhost]# urpme program

for example:

[root@localhost]# urpme xmms


[edit] Advanced urpmi use

Urpmi installs software from repositories. A repository is a place where RPMs are stored. Repositories can be any place where you can store RPM packages: a folder on a hard disk, a CD-Rom, a file server on the internet, etc etc.

When you install Mandriva Linux the install media (the 3 cd-roms or DVD) are automatically added as repositories (standard repos). The main official repositories are called Main, Contrib and Update.

It is also possible to add independent repositories. The best known are PLF-free and PLF-nonfree. These independent repos must be added manually to urpmi. (It is also possible to add the standard repos by hand.)

For accessing Easyurpmi see: http://www.mandrivausers.org/easyurpmi/index.php

Then do:

  • Select your version of Mandrake/Mandriva in the first dropdown. Then select your CPU architecture in the second. If you are unsure, pick i586.
  • For each of the dropdowns, select the location nearest to you then check the checkbox next to the dropdown. Once you have done this, click 'Proceed to step 3'
  • Open any command line (for example konsole) and copy the things in the black box into the command line. Do this by selecting it and middle mouse clicking or left and right click at the same time in the command line. Hit enter.

[edit] More urpmi commands

[edit] Update the database: urpmi.update

If a new software package is put into a repository urpmi needs to know about it. With the command urpmi.update, urpmi gets to know about these new packages.

For example, to update the package information for all repositories:

urpmi.update -a

[edit] Query the database: urpmq

With urpmq it is possible to query the urpmi database to see if there is an RPM for a program you want to install.

Example:

[root@localhost]# urpmq xmms

[edit] Find files in packages: urpmf

With the command urpmf it is possible to find individual files in rpm packages. For example if you want to know in which RPM file xxxx.so appears:

[root@localhost]# urpmf xxxx.so

[edit] Urpmi and a GUI

Mandriva has written a Graphical User Interface (abr. GUI) for Urpmi. This GUI can be accessed from the Mandriva Control Center (abr. MCC). The icons in the MCC Software section link to:

       * Install Software
       * Remove Software
       * Repository Management
       * Update

These point-and-click tools make package management usable for everyone.

[edit] URPMI and the Synthesis.hdlist.cz and hdlist.cz files

It seems that many people don't know this but when adding sources to urpmi's list you have two choices. You can either use a file called hdlist.cz which contains a list of all the RPM files which should be on the mirror. In addition to this it also contains information on these RPMs, such as descriptions of the programs and files it contains. An alternative file, synthesis.hdlist.cz on the other hand, is a much smaller alternative with less information. If you have dialup access or downloading hdlist.cz just takes too much time for you then synthesis.hdlist.cz is for you.

The hdlist file is usually (relatively) located in the ../base/ directory whereas the synthesis file is usually in the same directory as the RPMs, i.e. ( ./ relatively speaking). As a matter of fact if you provide no hdlist location when adding urpmi sources, urpmi will automatically attempt to download a synthesis.hdlist.cz file.

[edit] External links

Personal tools