Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am unable to install the finger package in Ubuntu .Below is the output on my terminal when I tried running the command

 `sudo apt-get install finger`

  ritesh@ubuntu:~$ sudo apt-get install finger
  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  The following NEW packages will be installed:
  0 upgraded, 1 newly installed, 0 to remove and 444 not upgraded.
  E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource
  temporarily unavailable)
  E: Unable to lock directory /var/cache/apt/archives/

I also see a lock file in location /var/cache/apt/archives with following permissions

   -rw-r----- 1 root root       0 2012-03-29 04:53 lock
share|improve this question

migrated from Aug 12 '12 at 21:48

This question came from our site for professional and enthusiast programmers.

Another process must be holding the lock. Try running fuser -vik /var/cache/apt/archives/lock to identify and possibly kill it. – Alan Curry Aug 12 '12 at 8:01
@Alan running this command doesnt help . I get nothing on console – Ritesh Aug 12 '12 at 8:03
This is what i get :- ritesh@ubuntu:/var/cache/apt/archives$ fuser -vik /var/cache/apt/archives/lock ritesh@ubuntu:/var/cache/apt/archives$ – Ritesh Aug 12 '12 at 8:05
@AlanCurry ritesh@ubuntu:/var/cache/apt/archives$ ps -eaf | grep sudo root 3333 1 0 13:02 ? 00:00:00 sudo apt-get install mailutils This is what i see probably held by installation of mailutils by root user but I am unable to kill it as I dont know default root password in ubuntu – Ritesh Aug 12 '12 at 8:10
You have to kill that stuck mailutils install before you can get anything done with apt. Also it would be nice to know how it got stuck. pstree -ap 3333 to find out what other processes are involved. – Alan Curry Aug 12 '12 at 8:16
up vote 3 down vote accepted

Ubuntu and Debian's apt-get, like most other package managers, will always allow only one instance at a time to run: you can't install two things simultaneously. The reason being that the two installation processes could interfere and the package database is fairly complex and not something you want to mess up.

If your package manager is complaining about not being able to get a lock, that means you have to wait for any running installations to finish (or cancel them) and quit any package manager front-ends that hold a permanent lock (like aptitude).

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .