| View previous topic :: View next topic |
| Author |
Message |
Germ Keeper of the BIG STICK

Joined: 30 Apr 2003 Posts: 12504 Location: Planet Earth
|
Posted: Sun Apr 25, 2004 3:20 pm Post subject: URPMI How-To |
|
|
urpmi is Mandrake's 100% GPL package management system. With it, you can install, uninstall, and upgrade software. It resolves dependencies and installs all needed packages, provided you have your software sources setup correctly. Learn to use urpmi and software management becomes a breeze.
This is intended to be a basic tutorial in the use of urpmi. Command line uses will be covered, but there is a GUI interface that does the basics. All operations are performed as su.
urpmi.addmedia
When you install Mandrake Linux, your installation CDs are setup as software sources, but you will need more than that to get all the goodies and updates for your system.
The basic command is urpmi.addmedia and you specify a source. The EasyUrpmi site at http://easyurpmi.zarb.org/ or http://urpmi-addmedia.org/ has a list of sources and mirrors. It will even give you the command to enter for each source. At a minimum, you will want main, plf, updates and contrib.
Main= just about everything you could want
Contrib= lots of optional stuff to enhance your install and plf dependencies
PLF (Penguin Liberation Front)= goodies such as eyecandy, audio, video, and ripping apps.
Updates= security fixes, bug fixes, and general updates. Everyone should have this source. Use the --update switch when adding this source. urpmi.addmedia --update
Here's an example of the urpmi.addmedia command syntax:
| Code: | | urpmi.addmedia nameofmedia ftp://ftp.site.com/path/to/Mandrake/RPMS with ../base/hdlist.cz |
If I want to add PLF as a software source for Mandrake 10 using the ftp.club-internet.fr mirror as a source, I would use this command: | Code: | | urpmi.addmedia plf ftp://ftp.club-internet.fr/pub/linux/plf/mandrake/10.0 with synthesis.hdlist.cz |
urpmi.setup
urpmi.setup is a script you can run to setup your sources. It has a nice GUI interface and is based on the mirror lists at PLF.
urpmi.update
The urpmi.update command will update the list of available packages. If I want to update the PLF package list, I use this command:
To update all sources:
To remove a software source: | Code: | | urpmi.removemedia nameofmedia |
urpmf
If you are trying to install or compile a package and it complains of a missing file, you can use the urpmf command to find the file and the package that contains it. If I'm missing foo.h, I would use this command to find it:
Then, if the return says foo57-devel, I can install it using:
Let's say you want to install a new browser and want to know what is available. Use this command: | Code: | | urpmf --summary 'browser' | You will get a list with names and short descriptions of available browsers.
Let's say you want to narrow the search to "web browsers". Use the -a switch, which means "and". | Code: | | urpmf --summary 'web' -a browser |
If you are using urpmi-4.5-28 or newer, there is a new option to urpmf. The -m option will tell you the media repository the file is located on.
Tells you:
| Code: | pine:PLF
pine2mutt:Contrib
pinentry:Contrib
pinentry-gtk:Contrib
pinentry-qt:Contrib
|
urpmi
This is how you install stuff. Let's say I want to install "mutt". It's a very basic command: urpmi will grab mutt and any dependencies.
OK, if you have a fast pipe to the 'net and are feeling deprived of the latest apps, try this: | Code: | | urpmi --auto-select | All available package updates will be listed and you are prompted for the go-ahead.
urpme
This command is how you uninstall packages. Dependencies will be taken into account and you will be prompted for confirmation. If I want to uninstall mutt, the command is:
urpmq
You can query the urpmi database with this command. To return a list of configured sources, use this command:
To look for a package named "foo", you can use: If you are not sure of the exact spelling, use the --fuzzy switch:
Errors
An error I've dealt with is "invalid list". If you're trying to install a package from, say, PLF and get an error saying "medium plf uses an invalid list file", use this command: | Code: | | rm /var/lib/urpmi/list.contrib | This stops the error and does not interfere with installing packages. The list file will be regenerated.
urpmi uses the rpm database to keep track of package management. If the database becomes corrupt, a common error with urpmi is "package already installed". If you know darn good and well that package is not installed, use these commands:
| Code: | rm -rf /var/lib/rpm/__db*
rpm --rebuilddb |
There is a lot more to URPMI than what I have covered, but hopefully this will give you a good start.
There is more detailed information in the man page and you can also visit http://www.urpmi.org/
EDIT: New address for Easy URPMI.
EDIT: Added new option for urpmf.
EDIT: Added alternate URL for Easy URPMI.
Last edited by Germ on Sun Dec 19, 2004 2:01 pm; edited 4 times in total |
|
| Back to top |
|
crouse Site Admin

Joined: 17 Apr 2003 Posts: 11855 Location: Iowa
|
|
| Back to top |
|
Germ Keeper of the BIG STICK

Joined: 30 Apr 2003 Posts: 12504 Location: Planet Earth
|
|
| Back to top |
|
schleyfox Ultimate Member

Joined: 25 Jan 2004 Posts: 2376 Location: In front of my computer
|
Posted: Tue Apr 27, 2004 8:42 pm Post subject: |
|
|
it says urpmi database locked
pls help
_________________ Gentoo 2005.1 2.6.13
Gentoo 2005.1 2.6.11
Ubuntu Hoary Hedgehog PPC
|
|
| Back to top |
|
Germ Keeper of the BIG STICK

Joined: 30 Apr 2003 Posts: 12504 Location: Planet Earth
|
Posted: Tue Apr 27, 2004 10:50 pm Post subject: |
|
|
OK, that should be fixable. Open a terminal and su to root.
Use this command: killall urpmi urpmi.update urpme rpm urpmi.addmedia
Then this command: rm -f /var/lib/urpmi/.LOCK /var/lib/rpm/RPMLOCK
That should do it. If the database is not unlocked afterwards, you will need to reboot. Should be good to go. Kind of a rare error.
_________________ Laptop: Mandriva 2010.1 PowerPack - 2.6.34.2-tmb-laptop-1mdv
Desktop: Mandriva 2010.1 PowerPack - kernel 2.6.34.2-tmb-desktop-1mdv
|
|
| Back to top |
|
schleyfox Ultimate Member

Joined: 25 Jan 2004 Posts: 2376 Location: In front of my computer
|
Posted: Wed Apr 28, 2004 12:48 am Post subject: |
|
|
| yeah i fixed it like that just after messing around thanks
_________________ Gentoo 2005.1 2.6.13
Gentoo 2005.1 2.6.11
Ubuntu Hoary Hedgehog PPC
|
|
| Back to top |
|
JP Linux Guru

Joined: 07 Jul 2004 Posts: 6677 Location: Central Montana
|
|
| Back to top |
|
Germ Keeper of the BIG STICK

Joined: 30 Apr 2003 Posts: 12504 Location: Planet Earth
|
|
| Back to top |
|
JP Linux Guru

Joined: 07 Jul 2004 Posts: 6677 Location: Central Montana
|
|
| Back to top |
|
Germ Keeper of the BIG STICK

Joined: 30 Apr 2003 Posts: 12504 Location: Planet Earth
|
|
| Back to top |
|
joshwilson_1 Advanced Member
Joined: 19 Jan 2004 Posts: 823
|
Posted: Tue Dec 14, 2004 4:46 pm Post subject: |
|
|
| Thanks for the info. I have been hearing about this for a while and I need a good package installer for my Mandrake install.
_________________ Mandrake 10.01 Community, Woody Debian, Red Hat 8, Suse 9.1
|
|
| Back to top |
|
Germ Keeper of the BIG STICK

Joined: 30 Apr 2003 Posts: 12504 Location: Planet Earth
|
Posted: Fri Dec 17, 2004 11:11 pm Post subject: |
|
|
Added:
1- new URL for Easy URPMI
2- new option for urpmf command
_________________ Laptop: Mandriva 2010.1 PowerPack - 2.6.34.2-tmb-laptop-1mdv
Desktop: Mandriva 2010.1 PowerPack - kernel 2.6.34.2-tmb-desktop-1mdv
|
|
| Back to top |
|
mmmna . . . .

Joined: 21 Apr 2003 Posts: 7258
|
Posted: Sat Dec 18, 2004 1:37 am Post subject: |
|
|
When performing URPMI as su, do you need to use 'su -' or will plain old vanilla 'su' always work??
A while ago, I learned the hard way that some stuff will fail if not actually using a true root login, as per 'su -', so I'm shaking that tree for your response....
_________________ -Kubuntu 10.04 LTS on Celeron D desktop
-PCLinuxOS 2010 LXDE on EeePC 900A with Atom n270 (modded with 32G SATA SSD drive and 2G ram).
|
|
| Back to top |
|
Germ Keeper of the BIG STICK

Joined: 30 Apr 2003 Posts: 12504 Location: Planet Earth
|
|
| Back to top |
|
lynch Moderator

Joined: 15 Nov 2003 Posts: 2665 Location: The Diamond State
|
|
| Back to top |
|
|