unable to open synaptic package manager

Asked by Mike Attrill

When I try to open synaptic package manager or upgrade manager I get a popup box with the following lines in it
E: Read error - read (0: Success)
E: Problem closing the gzip file /var/lib/dpkg/status - close (0: Success)
E: The package lists or status file could not be parsed or opened.
E:_cache>open() failed, please report.

Help Please i'm at my wits end.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu synaptic Edit question
Assignee:
No assignee Edit question
Solved by:
Mike Attrill
Solved:
Last query:
Last reply:
Revision history for this message
mycae (mycae) said :
#1

what happens if you open a terminal (Ctrl+Alt+T, or if running <=10.10 from applications menu) and then run

sudo apt-get update
sudo apt-get safe-upgrade

?

Can you post the output of that?

If your status file is corrupted that could be a problem, though it may be fixable with a little effort

Revision history for this message
Mike Attrill (mike-attrillm) said :
#2

On Sun, 2011-05-01 at 20:30 +0000, mycae wrote:
> Your question #155306 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/155306
>
> Status: Open => Answered
>
> mycae proposed the following answer:
> what happens if you open a terminal (Ctrl+Alt+T, or if running <=10.10
> from applications menu) and then run
>
> sudo apt-get update
> sudo apt-get safe-upgrade
>
> ?
>
> Can you post the output of that?
>
> If your status file is corrupted that could be a problem, though it may
> be fixable with a little effort
>
mike@mike-desktop:~$ sudo apt-get update
Ign cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1)
natty Release.gpg
Hit http://extras.ubuntu.com maverick
Release.gpg
Ign http://extras.ubuntu.com/ubuntu/ maverick/main
Translation-en
Ign http://extras.ubuntu.com/ubuntu/ maverick/main
Translation-en_GB
Hit http://security.ubuntu.com maverick-security
Release.gpg
Ign http://security.ubuntu.com/ubuntu/ maverick-security/main
Translation-en
Ign http://security.ubuntu.com/ubuntu/ maverick-security/main
Translation-en_GB
Hit http://archive.canonical.com maverick
Release.gpg
Ign http://archive.canonical.com/ maverick/partner
Translation-en
Ign http://archive.canonical.com/ maverick/partner
Translation-en_GB
Hit http://ppa.launchpad.net maverick
Release.gpg
Ign http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu/ maverick/main
Translation-en
Ign http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu/ maverick/main
Translation-en_GB
Hit http://extras.ubuntu.com maverick
Release
Ign http://security.ubuntu.com/ubuntu/ maverick-security/multiverse
Translation-en
Ign http://security.ubuntu.com/ubuntu/ maverick-security/multiverse
Translation-en_GB
Ign http://security.ubuntu.com/ubuntu/ maverick-security/restricted
Translation-en
Ign http://security.ubuntu.com/ubuntu/ maverick-security/restricted
Translation-en_GB
Ign http://security.ubuntu.com/ubuntu/ maverick-security/universe
Translation-en
Ign http://security.ubuntu.com/ubuntu/ maverick-security/universe
Translation-en_GB
Hit http://archive.canonical.com maverick
Release
Hit http://ppa.launchpad.net maverick
Release
Hit http://security.ubuntu.com maverick-security
Release
Hit http://extras.ubuntu.com maverick/main i386
Packages
Hit http://archive.canonical.com maverick/partner i386
Packages
Get:1 http://dl.google.com stable Release.gpg
[197B]
Hit http://ppa.launchpad.net maverick/main i386
Packages
Hit http://security.ubuntu.com maverick-security/main
Sources
Hit http://security.ubuntu.com maverick-security/restricted
Sources
Hit http://security.ubuntu.com maverick-security/universe
Sources
Hit http://security.ubuntu.com maverick-security/multiverse
Sources
Hit http://security.ubuntu.com maverick-security/main i386
Packages
Hit http://security.ubuntu.com maverick-security/restricted i386
Packages
Hit http://security.ubuntu.com maverick-security/universe i386
Packages
Hit http://security.ubuntu.com maverick-security/multiverse i386
Packages
Hit http://gb.archive.ubuntu.com maverick
Release.gpg
Ign http://gb.archive.ubuntu.com/ubuntu/ maverick/main
Translation-en
Hit http://gb.archive.ubuntu.com/ubuntu/ maverick/main
Translation-en_GB
Ign http://dl.google.com/linux/chrome/deb/ stable/main
Translation-en
Ign http://dl.google.com/linux/chrome/deb/ stable/main
Translation-en_GB
Get:2 http://dl.google.com stable Release
[1,347B]
Ign http://gb.archive.ubuntu.com/ubuntu/ maverick/multiverse
Translation-en
Hit http://gb.archive.ubuntu.com/ubuntu/ maverick/multiverse
Translation-en_GB
Ign http://gb.archive.ubuntu.com/ubuntu/ maverick/restricted
Translation-en
Hit http://gb.archive.ubuntu.com/ubuntu/ maverick/restricted
Translation-en_GB
Ign http://gb.archive.ubuntu.com/ubuntu/ maverick/universe
Translation-en
Hit http://gb.archive.ubuntu.com/ubuntu/ maverick/universe
Translation-en_GB
Hit http://gb.archive.ubuntu.com maverick-updates
Release.gpg
Ign http://gb.archive.ubuntu.com/ubuntu/ maverick-updates/main
Translation-en
Ign http://gb.archive.ubuntu.com/ubuntu/ maverick-updates/main
Translation-en_GB
Ign http://gb.archive.ubuntu.com/ubuntu/ maverick-updates/multiverse
Translation-en
Get:3 http://dl.google.com stable/main i386 Packages
[1,064B]
Ign http://gb.archive.ubuntu.com/ubuntu/ maverick-updates/multiverse
Translation-en_GB
Ign http://gb.archive.ubuntu.com/ubuntu/ maverick-updates/restricted
Translation-en
Ign http://gb.archive.ubuntu.com/ubuntu/ maverick-updates/restricted
Translation-en_GB
Ign http://gb.archive.ubuntu.com/ubuntu/ maverick-updates/universe
Translation-en
Ign http://gb.archive.ubuntu.com/ubuntu/ maverick-updates/universe
Translation-en_GB
Hit http://gb.archive.ubuntu.com maverick Release
Hit http://archive.getdeb.net maverick-getdeb Release.gpg
Ign http://archive.getdeb.net/ubuntu/ maverick-getdeb/games
Translation-en
Ign http://archive.getdeb.net/ubuntu/ maverick-getdeb/games
Translation-en_GB
Hit http://gb.archive.ubuntu.com maverick-updates Release
Hit http://gb.archive.ubuntu.com maverick/main
Sources
Hit http://gb.archive.ubuntu.com maverick/restricted
Sources
Hit http://gb.archive.ubuntu.com maverick/universe Sources
Hit http://gb.archive.ubuntu.com maverick/multiverse Sources
Hit http://gb.archive.ubuntu.com maverick/main i386 Packages
Hit http://gb.archive.ubuntu.com maverick/restricted i386 Packages
Get:4 http://gb.archive.ubuntu.com maverick/universe i386 Packages
[5,791kB]
Hit http://gb.archive.ubuntu.com maverick/multiverse i386
Packages
Hit http://gb.archive.ubuntu.com maverick-updates/main
Sources
Hit http://gb.archive.ubuntu.com maverick-updates/restricted
Sources
Hit http://gb.archive.ubuntu.com maverick-updates/universe
Sources
Hit http://gb.archive.ubuntu.com maverick-updates/multiverse
Sources
Hit http://gb.archive.ubuntu.com maverick-updates/main i386
Packages
Hit http://gb.archive.ubuntu.com maverick-updates/restricted i386
Packages
Hit http://gb.archive.ubuntu.com maverick-updates/universe i386
Packages
Hit http://gb.archive.ubuntu.com maverick-updates/multiverse i386
Packages
Hit http://archive.getdeb.net maverick-getdeb
Release
Hit http://archive.getdeb.net maverick-getdeb/games i386
Packages
Ign cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1)/
natty/main Translation-en
Ign cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1)/
natty/main Translation-en_GB
Ign cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1)/
natty/restricted Translation-en
Ign cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1)/
natty/restricted Translation-en_GB
Ign cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1)
natty Release
Ign cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1)
natty/main i386 Packages
Ign cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1)
natty/restricted i386 Packages
Ign cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1)
natty/main i386 Packages
Ign cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1)
natty/restricted i386 Packages
Err cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1)
natty/main i386 Packages
  Please use apt-cdrom to make this CD-ROM recognised by APT. apt-get
update cannot be used to add new CD-ROMs
Err cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1)
natty/restricted i386 Packages
  Please use apt-cdrom to make this CD-ROM recognised by APT. apt-get
update cannot be used to add new CD-ROMs
Fetched 2,609B in 10s
(258B/s)
W: Failed to fetch cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386
(20110427.1)/dists/natty/main/binary-i386/Packages.gz Please use
apt-cdrom to make this CD-ROM recognised by APT. apt-get update cannot
be used to add new CD-ROMs

W: Failed to fetch cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386
(20110427.1)/dists/natty/restricted/binary-i386/Packages.gz Please use
apt-cdrom to make this CD-ROM recognised by APT. apt-get update cannot
be used to add new CD-ROMs

E: Some index files failed to download, they have been ignored, or old
ones used instead.

mike@mike-desktop:~$ sudo apt-get safe-upgrade
E: Invalid operation safe-upgrade

Revision history for this message
mycae (mycae) said :
#3

If no-one else has a better idea, there is something you can try:

gksudo gedit /etc/apt/sources.list

then place a '#' (without quotation marks, just the octothorpe (hash) symbol) at the beginning of the line that contains the cdrom entry; then re-try the "sudo apt-get update" command.

But you may want to see if someone has a better idea; I suspect you may still have to manually replace the status file with one of the older backup status files. Someone may have the magic commands to do this without needing a few backwards and forwardses with you entering in commands and posting results.

Revision history for this message
Mike Attrill (mike-attrillm) said :
#4

Thanks for your help. I managed to find the answer to my problem from a previously answered question.

I ran
sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-backup
sudo mv /var/lib/dpkg/status-old /var/lib/dpkg/status

and then

sudo apt-get update

Lo and behold synaptic now works fine.

Thanks again.