LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 02: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, 02:28 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Have you tried to remove /var/lib/pacman/db.lck, as the message suggests?
 
Old 05-09-2011, 04: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, 04:20 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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, 04: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, 04:52 PM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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



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
[SOLVED] Cannot Install and remove package cslucsm Ubuntu 13 02-03-2017 06:25 PM
dpkg problem add remove package won't work Kathy A. Linux - Software 4 12-14-2011 09:02 AM
Package from Stable won't install... Alexvader Debian 14 02-21-2011 02:32 PM
How to remove existing rpm and install latest downloaded package samiksha Linux - Software 9 12-08-2010 04:49 AM
failed to configure, remove and install package after cancelling configuration umarzuki Debian 4 10-09-2009 09:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:56 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
Open Source Consulting | Domain Registration