LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   Answer on the 'urpmi database locked' message (https://www.linuxquestions.org/questions/mandriva-30/answer-on-the-urpmi-database-locked-message-297352/)

bglnelissen 03-03-2005 07:01 PM

Answer on the 'urpmi database locked' message
 
(i use mandrake 10.1 so plz tell me if it works on other systems with urpmi, i think it does)

while installing programs with urpmi you sometimes get an 'error' which says:
"URPMI DATABASE LOCKED"
This is normal while you're using the database (installing, removing using urpmi)
there are 2 simple lines that solve this problem NEED TO BE ROOT:

# rm -f "/var/lib/urpmi/.LOCK"
# rm -f "/var/lib/urpmi/.RPMLOCK"
Those rules will remove the 'locks' from the RPM database. Only use it when URPMI is NOT installing or removing a program.

To make things easy, and we like things easy, i wrote myself a little script. Open your text editor as root and save the little script as 'urpmi.unlock' in '/usr/bin/'

$ su
password

# kwrite
past the following text in a new file and save it in:
/usr/bin
name it:
urpmi.unlock

from now on the following command will unlock you URPMI DATABASE

# urpmi.unlock

################COPY EVERYTHING UNDER THIS LINE############
Code:

#!/bin/bash
echo "";
echo "Only root can unlock the URPMI database.";
echo "Starting with the removal of URPMI locks:";

rm -f "/var/lib/urpmi/.LOCK";
echo "    rm -f '/var/lib/urpmi/.LOCK'...";
rm -f "/var/lib/urpmi/.RPMLOCK";
echo "    rm -f '/var/lib/urpmi/.RPMLOCK'..."

echo "URPMI DATABASE UNLOCKED!";
echo "Happy installing!"
echo ""

################DON'T COPY THIS, END OF FILE#################

rshaw 03-04-2005 02:47 PM

moved to mandrake


All times are GMT -5. The time now is 01:38 AM.