Jump to content

URPMI Now Broken [solved]


Recommended Posts

I tried doing the urpmi changes in the how tos somewhere in these forum stickies *http://easyurpmi.zarb.org/*, and one of the servers hung, so I closed out of terminal. When I opened terminal back up and tried to do it again I kept getting URPMI locked messages. So then I tried urpmi.removemedia -a but that didn't work, either. Instead I get this:

 

[root@localhost vixenk]# urpmi.removemedia -a

unable to access hdlist file of "Installation Free CD1 (cdrom1)", medium ignored

unable to access hdlist file of "Installation Free CD2 (cdrom2)", medium ignored

unable to access hdlist file of "Installation Free CD3 (cdrom3)", medium ignored

unable to access hdlist file of "update_source", medium ignored

unable to access hdlist file of "plf-free", medium ignored

unable to access hdlist file of "plf-nonfree", medium ignored

unable to access hdlist file of "jpackage", medium ignored

removing medium "Installation Free CD1 (cdrom1)"

removing medium "Installation Free CD2 (cdrom2)"

removing medium "Installation Free CD3 (cdrom3)"

removing medium "update_source"

removing medium "plf-free"

removing medium "plf-nonfree"

removing medium "main"

removing medium "updates"

removing medium "contrib"

removing medium "jpackage"

urpmi database locked

 

Now when I try to search for software to install, the results are always none, and it doesn't even show results from the cds. HELP!!!!

 

Oh, I just wanted to add, this is what I get when I try to update the URPMI:

 

[root@localhost vixenk]# urpmi.addmedia plf-free ftp://distrib-coffee.ipsl.jussieu.fr/pub/...iva/free/2006.0 with hdlist.cz

unable to access hdlist file of "Installation Free CD1 (cdrom1)", medium ignored

unable to access hdlist file of "Installation Free CD2 (cdrom2)", medium ignored

unable to access hdlist file of "Installation Free CD3 (cdrom3)", medium ignored

unable to access hdlist file of "update_source", medium ignored

unable to access hdlist file of "plf-free", medium ignored

unable to access hdlist file of "plf-nonfree", medium ignored

unable to access hdlist file of "jpackage", medium ignored

medium "plf-free" already exists

 

The list of installable software in the Control Center is blank, I can't download updates, and I can't change where updates are downloaded from.

 

I just tried restoring from my system backup as well, and that didn't work, either.

 

[moved from Installing Mandriva by spinynorman]

Edited by vixenk
Link to comment
Share on other sites

You shouldn't need to reinstall. :)

 

Try this in a terminal:

 

su
[root password]
rm -f /var/lib/urpmi/.LOCK
rm -f /var/lib/urpmi/.RPMLOCK

 

If it doesn't work straightaway, try a reboot...

 

If you have a problem with a server when using urpmi, don't just close the terminal: use CTRL & C to abandon the process, and choose a different server.

Link to comment
Share on other sites

Thanks. :)

 

Unfortunately, I already reinstalled... I figured it wasn't a big deal to do since it takes me all of 7-10 minutes, and I really wasn't expecting a second reply. O_O

 

I will keep this in mind though *the location of the urpmi folder and the ctrl + c shortcut* for if this or anything similar ever happens again. Good stuff to know. :)

 

Darn, I just keep on forgetting this OS is, erm, more open than Windows. :P

Link to comment
Share on other sites

Look, I know that, and I'm sorry. I've only been using this for 3 or 4 days when I posted that question though, and it's unfair to expect me to just instantly snap out of that mentality when I've been using Windows for almost 10 years.

 

I felt dumb enough when I realized there was a fix for it besides restarting. Do you really think it's neccessary to make me feel unwelcome here as well?

Link to comment
Share on other sites

Everybody is welcome here, but the place won't be of any use to him if he doesn't try to understand how the system works- and problems like the one here are perfect for learning something about nuts+bolts of your Linux.

Under Windows you cannot learn much, because Microsoft does not want you to- so reinstalling when the desktop sneezes a couple of times is considered "normal"...

Excluding a very major change in your Linuxes' structure, or a very major screwup, you will need installing your system just ONCE, and you really start using Linux having "install once" as a taboo rule.

You should also pay attention to what's been suggested to you, and (most important thing!) do - not - hurry !

Edited by scarecrow
Link to comment
Share on other sites

*sigh* I understand all of this... I just made one scew up, and I said already that I'm sorry for making it. And I'm trying to understand how the system works, if I wasn't I wouldn't have a wall of quick reference papers behind my desk atm full of unix commands and mapping Mandriva's filesystem + my own personal notes.

 

And this has taught me something about the nuts+bolts of my Linux. I now know where the urpmi folder is located, how to remove a lock from it that won't budge, and how to properly abandon a process.

 

I tried starting out with Linux as "install once" as a rule, with Ubuntu. I followed everything that the forums suggested, without anything being explained to me so I had no idea what I was doing. I ended up with what I guess was the Linux equivalent to the Windows BSD at startup, and had no idea how it got there because I didn't understand anything about the command lines being thrown at me. So when I installed Mandriva, I swore that I wouldn't enter any commands in the terminal without understanding what they were doing, otherwise they would be pretty worthless to me because I wouldn't be learning anything, I would just be acting the monkey copying and pasting, and if something went wrong I wouldn't even begin to know how it could be undone. So yes - if I don't understand what is being thrown at me, I'm going to reinstall, until I can understand it. Windows doesn't have to be reinstalled half of the time, either, but people that don't know how to fix what's wrong do it, up until they learn how to fix it *if they care to research and learn how to fix it*.

 

Now, in this particular case, I was seriously not expecting a second reply, much less one that I could understand. And I did hurry - I made a mistake, and I'm sorry I made it. But don't assume that I'm not trying to learn how the system works, or that I walked away from this learning nothing, etc. In all seriousness I learned more from it now than I would've at the time, because now I actually understand what the commands given to me would do - when the urpmi gets locked it's locked by a hidden file that needs to be deleted to remove the lock. I can't really learn from fixing stuff unless I understand what I'm doing to fix it.

Edited by vixenk
Link to comment
Share on other sites

Everything's cool.

To help you understand a little better, when urpmi or rpm runs, it checks for the existence of this hidden file. If it doesn't exist, it creates it, then runs. Right before the process exits, it deletes this file. This allows the rpm process to make sure that nothing is accessing any files or the rpm database that it is trying to alter. Sometimes, when the process dies badly (exits abnormally), it doesn't have time to delete this file, so it always thinks afterwards that the database is locked until you delete this file manually. You will rarely have to do this, so if you get the error again, before you manually delete this file, just make sure there are no rpm processes running.

You can check in a console, as root:

 

ps ax | grep rpm

 

If you see an rpm process there, kill it like this:

 

kill -s 9 PID

 

(replacing 'PID' with the actual process id number you see from the first command (it's the first number you see on the left next to the process).

Be careful that you really didn't already have urpmi running on purpose, because killing it in the middle of doing its job can (rarely) cause serious issues.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...