Unlocking URPMI…

Sometimes when using urpmi (command line or via a GUI mechanism), it can crash and leave you stuck with a cryptic message that the urpmi database is locked. When this happens, open a shell (Konsole, xterm, whatever), su to root, and navigate to “/var/lib/urpmi”. Look for and delete the hidden files (“ls -la” will show them) .LOCK and .RPMLOCK. Then retry urpmi.

I prefer using the command line, as it is more forgiving and informative than the GUI (rpmdrake), IMHO. In Mandriva Control Center, I have found that any error in the download step, aside from bad signature warnings, will usually result in the failure of all package install attempts (assuming you selected multiple packages), and the packages you had selected get unselected when you finally get back to the point of retrying. This really stinks if you had to wade through hundreds of entries to find the dozen or so packages you wanted to install.

However, stuff that downloaded is still there on your hard drive, provided you do not retry after an aborted package install attempt. Instead, open a shell as root, navigate to “/var/cache/urpmi/rpms”, and you should see all of the packages that did get downloaded, but not installed. Could be a lot of stuff if your install download almost made it to completion. Simply type in “urpmi ./*.rpm” while in the rpm directory to install what you downloaded. Any dependancies still required will be downloaded. If it fails on a package, narrow your parameters (“urpmi ./libj*.rpm” or “urpmi ./kde-*.rpm” for example), and install piecemeal around the offending package.

Note that having /var on its own partition is handy here, as it can fill up with uninstalled or partially downloaded packages (in the “/var/cache/urpmi/partial” directory). If that happens if /var is on the root partition, your system could have, uh, “issues”. If it starts to fill up as its own partition, the root partition is isolated from this, and resizing the /var partition is much less risky than resizing the root partition. Now you have a good place to start looking if /var starts to fill up without apparent reason.

Be aware that your update source files can also take up a lot of space, especially if you have a lot of them. I tend to keep at least two to three duplicate sets pointing to different urpmi repositories on hand, as if one download fails, urpmi will try the next, often successfully. Good places to find repositories are:

Hope this helps!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: