2

I am trying to install sublime using terminal but it pop out error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package sublime

And when I try to install vlc from Ubuntu Software Center then also I can't install since there is no install icon.

Upon execution of sudo apt-get update terminal pops out following output

E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) 
E: Unable to lock directory /var/lib/apt/lists/
muru
  • 197,895
  • 55
  • 485
  • 740
  • 3
    http://askubuntu.com/questions/378558/unable-to-locate-package-while-trying-to-install-packages-by-apt

    This question has already been answered here.

    – RishbhSharma Sep 21 '14 at 19:24
  • enable multiverse and universe in software sources in software updates. –  Sep 21 '14 at 19:18

2 Answers2

2

Assuming you are trying to install Sublime Text, it is not in the official Ubuntu repositories. Install Sublime Text 3 using the package from their site.

muru
  • 197,895
  • 55
  • 485
  • 740
-2

The output :

E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) 
E: Unable to lock directory /var/lib/apt/lists/

Points to the file /var/lib/apt/lists/lock which is created when you use sudo apt-get install and sudo apt-get update command. This file prevents multiple apt-get calls and is automatically removed after the command execution has completed. But sometimes it doesn't get removed, and to do that manually,

This set of code needs to be executed.

sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo apt-get update

Then try again.

Source : "Unable to locate package" while trying to install packages with APT | Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?

  • Deleting system files is very dangerous. While it might sometimes be the best course of action, it certainly shouldn't be a first resort. – evilsoup Sep 21 '14 at 20:21
  • I agree but /var/lib/apt/lists/lock file needed to be removed to execute sudo apt-get update. I've also added the link to the possible duplicate in a comment. @evilsoup – RishbhSharma Sep 22 '14 at 11:53