USA Linux Users Group Forum Index
Log in Register FAQ Memberlist Search USA Linux Users Group Forum Index Album

URPMI How-To
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » System Administration and Security
View previous topic :: View next topic  
Author Message
Germ
Keeper of the BIG STICK


Joined: 30 Apr 2003
Posts: 12504
Location: Planet Earth

PostPosted: Sun Apr 25, 2004 3:20 pm    Post subject: URPMI How-To Reply with quote

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:
Code:
urpmi.update plf


To update all sources:
Code:
urpmi.update -a


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:
Code:
urpmf foo.h

Then, if the return says foo57-devel, I can install it using:
Code:
urpmi foo57-devel


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.
Code:
urpmf -m pine

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:
Code:
urpmi mutt
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:
Code:
urpme mutt


urpmq

You can query the urpmi database with this command. To return a list of configured sources, use this command:
Code:
urpmq --list-media


To look for a package named "foo", you can use:
Code:
urpmq foo
If you are not sure of the exact spelling, use the --fuzzy switch:
Code:
urpmq --fuzzy foo


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
View user's profile Send private message Send e-mail Yahoo Messenger
crouse
Site Admin


Joined: 17 Apr 2003
Posts: 11855
Location: Iowa

PostPosted: Sun Apr 25, 2004 5:28 pm    Post subject: Reply with quote

Very nice Smile
Thanks !!


Back to top
View user's profile Send private message Visit poster's website AIM Address
Germ
Keeper of the BIG STICK


Joined: 30 Apr 2003
Posts: 12504
Location: Planet Earth

PostPosted: Sun Apr 25, 2004 8:12 pm    Post subject: Reply with quote

Thanks. Very Happy

URPMI in action, copied from my console:
Code:
[root@grendel germ]# urpmi checkinstall

    ftp://ftp.club-internet.fr/pub/unix/linux/distributions/Mandrake/9.2/contrib/i586/./checkinstall-1.6.0-0.beta2.1mdk.i586.rpm
installing /var/cache/urpmi/rpms/checkinstall-1.6.0-0.beta2.1mdk.i586.rpm
Preparing...                ##################################################
   1:checkinstall           ##################################################
[root@grendel germ]#


Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
schleyfox
Ultimate Member


Joined: 25 Jan 2004
Posts: 2376
Location: In front of my computer

PostPosted: Tue Apr 27, 2004 8:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
Germ
Keeper of the BIG STICK


Joined: 30 Apr 2003
Posts: 12504
Location: Planet Earth

PostPosted: Tue Apr 27, 2004 10:50 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Yahoo Messenger
schleyfox
Ultimate Member


Joined: 25 Jan 2004
Posts: 2376
Location: In front of my computer

PostPosted: Wed Apr 28, 2004 12:48 am    Post subject: Reply with quote

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
View user's profile Send private message
JP
Linux Guru


Joined: 07 Jul 2004
Posts: 6677
Location: Central Montana

PostPosted: Tue Dec 14, 2004 4:25 am    Post subject: Reply with quote

Germ I went to easyurpmi and checked all of the sources you suggested, used an FTP in Netherlands, they said to type in some commands, I copied and pasted, and Viola! it started everything going and 45 minutes later it came back to a command prompt. Surprised Shocked I think it's all done... Isn't there something else I need to do? I can't believe it's that easy. That's just like updating in Libranet, it does it all for you! Wink THX, JP



_________________
Dell Box - Arch Linux
Dell Lappy - DreamLinux 3.5 - Default OS
Mepis 8.0 - Backup
Back to top
View user's profile Send private message Visit poster's website
Germ
Keeper of the BIG STICK


Joined: 30 Apr 2003
Posts: 12504
Location: Planet Earth

PostPosted: Tue Dec 14, 2004 12:02 pm    Post subject: Reply with quote

That's all you need to do. Wink Now that your sources are setup you can install/upgrade software.

KMenu > System > Configuration > Install Software

That starts the rpmdrake GUI and it will list all the available software. You can sort it several different ways. upgradeable, addable, specific repository, etc.



_________________
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
View user's profile Send private message Send e-mail Yahoo Messenger
JP
Linux Guru


Joined: 07 Jul 2004
Posts: 6677
Location: Central Montana

PostPosted: Tue Dec 14, 2004 2:32 pm    Post subject: Reply with quote

I don't know what else I need! I've got Firefox, I've got Thunderbird, and I've got USALUG! What else could a man want? Very Happy Laughing



_________________
Dell Box - Arch Linux
Dell Lappy - DreamLinux 3.5 - Default OS
Mepis 8.0 - Backup
Back to top
View user's profile Send private message Visit poster's website
Germ
Keeper of the BIG STICK


Joined: 30 Apr 2003
Posts: 12504
Location: Planet Earth

PostPosted: Tue Dec 14, 2004 3:20 pm    Post subject: Reply with quote

For one thing, you need the updates. There are several security and bugfix updates.

Another thing, there are all kinds of goodies in Contrib and PLF. Wink



_________________
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
View user's profile Send private message Send e-mail Yahoo Messenger
joshwilson_1
Advanced Member


Joined: 19 Jan 2004
Posts: 823

PostPosted: Tue Dec 14, 2004 4:46 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Germ
Keeper of the BIG STICK


Joined: 30 Apr 2003
Posts: 12504
Location: Planet Earth

PostPosted: Fri Dec 17, 2004 11:11 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Yahoo Messenger
mmmna
. . . .


Joined: 21 Apr 2003
Posts: 7258

PostPosted: Sat Dec 18, 2004 1:37 am    Post subject: Reply with quote

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
View user's profile Send private message
Germ
Keeper of the BIG STICK


Joined: 30 Apr 2003
Posts: 12504
Location: Planet Earth

PostPosted: Sat Dec 18, 2004 1:43 am    Post subject: Reply with quote

Plain old 'su'. Wink



_________________
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
View user's profile Send private message Send e-mail Yahoo Messenger
lynch
Moderator


Joined: 15 Nov 2003
Posts: 2665
Location: The Diamond State

PostPosted: Sun Dec 19, 2004 9:08 am    Post subject: Reply with quote

I have'nt been able to reach easyurpmi.org for days. Confused
lynch



_________________
Mandriva 2010 Spring -2.6.31.12-server-2mnb
PCLinuxOS 2009 -2.6.26.8.tex3
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » System Administration and Security All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All content © 2003-2009 - Usa Linux Users Group
This forum is powered by phpBB. © 2001-2009 phpBB Group
Theme created by phpBBStyles.com and modified by Crouse