1

My question(s) are related to the sequence of the following actions:

i) I performed a fresh installation of 12.04 on a machine

ii) After the installation was complete and the media ( optical disk ) were removed ( as per the prompt ), I rebooted the machine and logged in into the brand-new system.

iii) I opened a terminal and tried to do an update of APT's cache ( sudo apt-get update ). This results in apt-get reporting an error due to some conflict it detects ( indicated by the /var/lib/apt/lists/lock file being locked by some other application )

This question ( or related questions ) seems to have been asked several times and one ( plausible ) post explains the error as having been caused by some updating software such as Software Center or Synaptic already running.

  • Is this systematic ( i.e. part of the installation process )?

  • Is the system trying to run Synaptic after a fresh installation ( ... perhaps as some automated post-installation sequence which runs on initial log-in )?

  • Did I get the lock error for apt-get update because I was inadvertently interfering with another instance of apt-get or similar which gets started immediately after the first log in of a user after a fresh installation?

In short I would like to understand why this happened, because as outlined above, after the installation and my firs log-in, I did not launch or start any apps. >other< than the terminal (....from previous experience with the Synaptic package I knew that if you intend to use apt-get you must make sure Synaptic is not running..).

Note:

You only seem to get this when you try to run sudo apt-get from one of the pseudo terminals within the X windowing system. You don't get the lock error if you use one of the virtual terminals ( the character based ones you get by doing 'Ctrl+Alt+F(1-6)').

Exact error messages ( added at request from one of the commenters @Sushantp606 ):

E: Could not get lock /var/lib/apt/lists/lock -open ( 11: Resource temporarily unavailable )
E: Unable to lock directory /var/lib/apt/lists/
darbehdar
  • 481
  • paste the exact prompted error.. – Sukupa91 Nov 28 '13 at 05:43
  • Thank you @Braiam for touching up my post with your edits...helped me realize the available choices when posting in the future. – darbehdar Nov 29 '13 at 06:35
  • Hi @Sushantp606, I did not include the error messages since I thought they might have been included in the other posts related to this problem. But I will edit the main post and include them for completeness – darbehdar Nov 29 '13 at 06:38

1 Answers1

1

First of all synaptic is not installed by default in Ubuntu 12.04 unless you installed it manually. Most probably the problem is causing by software center. It may happen that when you are trying to update apt-cache, the software center is also trying the same. That is causing the error. To be sure you can open software center and on top right (last icon) you might get an busy or 'progress' icon.

enter image description here

Then wait for software center to finish its action. Then try apt-get update. I am not sure if software center center can work or not from virtual console. If Software center can work from VC the process might be over already that is why you did not get any error.

sourav c.
  • 44,715