LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   won't let me install a package or remove a package (https://www.linuxquestions.org/questions/linux-newbie-8/wont-let-me-install-a-package-or-remove-a-package-879700/)

archie101 05-09-2011 02:26 PM

won't let me install a package or remove a package
 
i tried to remove urbanterror with
Code:

pacman -R urbanterror
and there was an error that said
Code:

error: failed to init transaction (unable to lock database)
  if you're sure a package manager is not already
  running, you can remove /var/lib/pacman/db.lck

and there was the same error when i try to install a package. I recently did a full system update could that be the problem?

TobiSGD 05-09-2011 02:28 PM

Have you tried to remove /var/lib/pacman/db.lck, as the message suggests?

archie101 05-09-2011 04:09 PM

no i did not because i did not know if that would mess anything up.

TobiSGD 05-09-2011 04:20 PM

Just try it, it is only a lock-file. If your package manager crashes this file will not be removed (it will be at a normal exit) and the package database will stay locked. Remove the lock and it should work.

archie101 05-09-2011 04:27 PM

i know i should know this but i do not how do i delete it i have joe vi and nano as my editors but i only know joe

TobiSGD 05-09-2011 04:52 PM

You don't use a text editor to delete a file (have you ever deleted a file with a text editor?).
Use the rm-command, in this case
Code:

rm /var/lib/pacman/db.lck
You need to be root to do that.

If you need more help with basic commands, like cd, rm, and so on read a tutorial on these, like this one.


All times are GMT -5. The time now is 10:21 AM.