Update manager problem

Asked by WFKernested

E:could not open file /var/lib/dpkg/status - open(2:No such file or directory)
E:The package lists or status file could not be parsed or opened

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu software-center Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

The file /var/lib/dpkg/status is a key file for the package management system on Ubuntu. It is the inventory with the information which packages are installed on your system. The error message above tells that this file is missing (or even the whole directory where this file should be).

If that file cannot be recovered from a backup, you have got a severe problem in your Ubuntu installation that might end up in the necessity to re-install the whole system.

To check the amount of damage and possibilities to restore the file contents please open a terminal and issue the following commands:

uname -a
lsb_release -a
ls /var
ls /var/lib
ls -l /var/lib/dpkg
ls /var/backups

then select all output, copy it and paste it into this question document.

Revision history for this message
WFKernested (waynekernested) said :
#2

wfk@ubuntu:~$ uname -a
Linux ubuntu 3.2.0-48-generic #74-Ubuntu SMP Thu Jun 6 19:45:16 UTC 2013 i686 i686 i386 GNU/Linux
wfk@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.2 LTS
Release: 12.04
Codename: precise
wfk@ubuntu:~$ ls /var
backups cache crash games lib local lock log mail opt run spool tmp
wfk@ubuntu:~$ ls /var/lib
AccountsService binfmts dpkg.backup libuuid NetworkManager python-support udisks vim
acpi-support colord gconf lightdm ntpdate rfkill update-manager xfonts
acroplugin computer-janitor gdm lintian nvidia-common samba update-notifier xine
alsa dbus ghostscript locales os-prober sgml-base update-rc.d xkb
apt defoma hp logrotate pam snmp upower xml-core
apt-xapian-index dhcp initramfs-tools misc plymouth sudo urandom
aspell dictionaries-common initscripts mlocate polkit-1 synaptic ureadahead
avahi-autoipd doc-base insserv mplayer pulseaudio ubiquity usb_modeswitch
belocs dpkg libreoffice msttcorefonts pycentral ucf usbutils
wfk@ubuntu:~$ ls -l/var/lib/dpkg
ls: invalid option -- '/'
Try `ls --help' for more information.
wfk@ubuntu:~$ ls /var/backups
apt.extended_states.0 apt.extended_states.3.gz apt.extended_states.6.gz dpkg.status.2.gz dpkg.status.5.gz gshadow.bak
apt.extended_states.1.gz apt.extended_states.4.gz dpkg.status.0 dpkg.status.3.gz dpkg.status.6.gz passwd.bak
apt.extended_states.2.gz apt.extended_states.5.gz dpkg.status.1.gz dpkg.status.4.gz group.bak shadow.bak
wfk@ubuntu:~$

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

Please try again, you missed a space character in the most important command:

ls -l /var/lib/dpkg

and copy/paste the output as done before.

Revision history for this message
WFKernested (waynekernested) said :
#4

wfk@ubuntu:~$ uname -a
Linux ubuntu 3.2.0-48-generic #74-Ubuntu SMP Thu Jun 6 19:45:16 UTC 2013 i686 i686 i386 GNU/Linux
wfk@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.2 LTS
Release: 12.04
Codename: precise
wfk@ubuntu:~$ ls /var
backups cache crash games lib local lock log mail opt run spool tmp
wfk@ubuntu:~$ ls /var/lib
AccountsService binfmts dpkg.backup libuuid NetworkManager python-support udisks vim
acpi-support colord gconf lightdm ntpdate rfkill update-manager xfonts
acroplugin computer-janitor gdm lintian nvidia-common samba update-notifier xine
alsa dbus ghostscript locales os-prober sgml-base update-rc.d xkb
apt defoma hp logrotate pam snmp upower xml-core
apt-xapian-index dhcp initramfs-tools misc plymouth sudo urandom
aspell dictionaries-common initscripts mlocate polkit-1 synaptic ureadahead
avahi-autoipd doc-base insserv mplayer pulseaudio ubiquity usb_modeswitch
belocs dpkg libreoffice msttcorefonts pycentral ucf usbutils
wfk@ubuntu:~$ ls -l/var/lib/dpkg
ls: invalid option -- '/'
Try `ls --help' for more information.
wfk@ubuntu:~$ ls-l/var/lib/dpkg
bash: ls-l/var/lib/dpkg: No such file or directory
wfk@ubuntu:~$ ls -l/var/lib/dpkg
ls: invalid option -- '/'
Try `ls --help' for more information.
wfk@ubuntu:~$ call me stupid but it still does not work.
No command 'call' found, did you mean:
 Command 'wall' from package 'bsdutils' (main)
 Command 'calc' from package 'apcalc' (universe)
 Command 'cal' from package 'bsdmainutils' (main)
call: command not found
wfk@ubuntu:~$ ls /var/backups
apt.extended_states.0 apt.extended_states.3.gz apt.extended_states.6.gz dpkg.status.2.gz dpkg.status.5.gz gshadow.bak
apt.extended_states.1.gz apt.extended_states.4.gz dpkg.status.0 dpkg.status.3.gz dpkg.status.6.gz passwd.bak
apt.extended_states.2.gz apt.extended_states.5.gz dpkg.status.1.gz dpkg.status.4.gz group.bak shadow.bak
wfk@ubuntu:~$

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

it has to be
ls (space) -l (space) /var/lib/dpkg

Revision history for this message
Hamish McIntyre-Bhatty (hamishmb) said :
#6

With any luck at all, inside that directory should be "status-old".
If this does exist, copy it to /var/lib/dpkg/status with:
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status

However, please run the command above first.

Can you help with this problem?

Provide an answer of your own, or ask WFKernested for more information if necessary.

To post a message you must log in.