Board index Linux General Stuffs

Moderator: chandranjoy

Apt-get error on Ubuntu 10.04

Postby chandranjoy » Thu Jul 21, 2011 6:11 pm

apt-get error on Ubuntu 10.04:
Errors:
root@server:~# apt-get update
E: Could not open lock file /var/lib/apt/lists/lock - open (2: No such file or directory)
E: Unable to lock the list directory

root@server:~# dpkg -l
dpkg-query: failed to open package info file `/var/lib/dpkg/status' for reading: No such file or directory

root@server:~# apt-get install lsof
E: Could not open lock file /var/lib/dpkg/lock - open (2: No such file or directory)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

root@server:~# apt-get update
E: Lists directory /var/lib/apt/lists/partial is missing.
E: Archive directory /var/cache/apt/archives/partial is missing.



Fix:
root@server:~# mkdir /var/lib/apt/lists -p
root@server:~# mkdir -p /var/lib/dpkg
root@server:~# touch /var/lib/apt/lists/lock
root@server:~# touch /var/lib/dpkg/status
root@server:~# mkdir -p /var/lib/apt/lists/partial
root@server:~# mkdir -p /var/cache/apt/archives/partial
Now you can run the following command without any errors.
root@server:~# apt-get update
chandranjoy
Site Admin
 
Posts: 283
Joined: Fri Oct 23, 2009 11:19 pm

Return to General Stuffs

Who is online

Users browsing this forum: No registered users and 1 guest


cron