2

If I want to install a program by:

sudo apt-get install package_name

I always get the error:

E: Could not open lock file /var/lib/apt/lists/lock - open (2 No such file or directory)
E: Unable to lock the administration directory (/var/lib/dpkg) , are you root?

I am root, but still get the error. Any idea ?

Jacob Vlijm
  • 82,471
  • 12
  • 195
  • 299
user278122
  • 431
  • 1
  • 4
  • 4
  • Is `sudo apt-get clean` working ? Try after logout and back login. – Pandya May 08 '14 at 10:37
  • ls:cannot access sudo :no such file or directory ls:cannot access apt-get :no such file or directory ls:cannot access clean :no such file or directory – user278122 May 08 '14 at 10:55
  • That was `Is`, not `ls`. The command that @Pandya suggested was `sudo apt-get clean`. – terdon May 08 '14 at 14:11
  • Is command not found , sudo apt-get clean (E:Lists directory /var/lib/apt/lists/partial is missing ) – user278122 May 08 '14 at 14:52

1 Answers1

1

Start a terminal by pressing Ctrl + Alt + T on keyboard, copy this following to Terminal window

sudo cp /var/backups/dpkg.status.0 /var/lib/dpkg/status
sudo apt-get update

Or for more detail you can read here

Liso
  • 15,217
  • 3
  • 50
  • 80