LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-09-2011, 03:26 PM   #1
archie101
Member
 
Registered: Apr 2011
Location: u.s
Distribution: arch linux
Posts: 48

Rep: Reputation: 0
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?
 
Old 05-09-2011, 03:28 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
Have you tried to remove /var/lib/pacman/db.lck, as the message suggests?
 
Old 05-09-2011, 05:09 PM   #3
archie101
Member
 
Registered: Apr 2011
Location: u.s
Distribution: arch linux
Posts: 48

Original Poster
Rep: Reputation: 0
no i did not because i did not know if that would mess anything up.
 
Old 05-09-2011, 05:20 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
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.
 
Old 05-09-2011, 05:27 PM   #5
archie101
Member
 
Registered: Apr 2011
Location: u.s
Distribution: arch linux
Posts: 48

Original Poster
Rep: Reputation: 0
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
 
Old 05-09-2011, 05:52 PM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
dpkg problem add remove package won't work Kathy A. Linux - Software 4 12-14-2011 10:02 AM
[SOLVED] Cannot Install and remove package cslucsm Ubuntu 11 09-13-2011 07:06 PM
Package from Stable won't install... Alexvader Debian 14 02-21-2011 03:32 PM
How to remove existing rpm and install latest downloaded package samiksha Linux - Software 9 12-08-2010 05:49 AM
failed to configure, remove and install package after cancelling configuration umarzuki Debian 4 10-09-2009 10:17 AM


All times are GMT -5. The time now is 12:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration