synaptic error

Asked by Martino

After a synaptic crash there is always this error:
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/dpkg/status
E: Impossibile analizzare o aprire l'elenco dei pacchetti o il file di stato.
E: _cache->open() failed, please report.

XUBUNTU 8.04LTS

lots of thanks, bye

Martino

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu synaptic Edit question
Assignee:
No assignee Edit question
Solved by:
Mark Rijckenberg
Solved:
Last query:
Last reply:
Revision history for this message
Soul-Sing (soulzing) said :
#1

sudo rm /var/lib/apt/lists/* -vf
sudo apt-get update

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#2

Hi,

First please make sure to close all open programs, including all package managers like Synaptic, Add/remove programs, etc ...

Then please try this procedure:

Step 1: Open Terminal from "Applications->Accessories->
Terminal"

Step 2: Please COPY-PASTE each line below into the Terminal then hit <enter> after each line)

sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
sudo rm -rf /var/lib/dpkg/updates/*
sudo rm -rf /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists/partial
LANG=C;sudo aptitude clean
LANG=C;sudo aptitude autoclean
LANG=C;sudo apt-get update
sudo dpkg --clear-avail
sudo dpkg --configure -a
LANG=C;sudo aptitude install -f
LANG=C;sudo aptitude update
LANG=C;sudo aptitude dist-upgrade

Step 3: Please post results (copy/paste terminal output from each command) on this thread

Hope it helps,

Regards,

Mark

Revision history for this message
Martino (martino-bello) said :
#3

Hi Mark (et al.),

    I have done your commands list, here the result:

martino@Aopen:~$ sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
[sudo] password for martino:
martino@Aopen:~$ sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
martino@Aopen:~$ sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
martino@Aopen:~$ sudo rm -rf /var/lib/dpkg/updates/*
martino@Aopen:~$ sudo rm -rf /var/lib/apt/lists
martino@Aopen:~$ sudo mkdir /var/lib/apt/lists
martino@Aopen:~$ sudo mkdir /var/lib/apt/lists/partial
martino@Aopen:~$ LANG=C;sudo aptitude clean
Reading package lists... Done
Building dependency tree
Reading state information... Done
Initializing package states... Done
Writing extended state information... Done
Building tag database... Done
martino@Aopen:~$ LANG=C;sudo aptitude autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
Freed 0B of disk space
martino@Aopen:~$ LANG=C;sudo apt-get update
Get:1 http://archive.canonical.com hardy Release.gpg [189B]
Get:2 http://archive.ubuntu.com hardy Release.gpg [189B]
Get:3 http://archive.ubuntu.com hardy-updates Release.gpg [189B]
Get:4 http://archive.canonical.com hardy Release [9331B]
Get:5 http://archive.ubuntu.com hardy-security Release.gpg [189B]
Get:6 http://archive.ubuntu.com hardy Release [65.9kB]
Get:7 http://archive.ubuntu.com hardy-updates Release [58.5kB]
Get:8 http://archive.ubuntu.com hardy-security Release [58.5kB]
Get:9 http://archive.canonical.com hardy/partner Packages [9085B]
Get:10 http://archive.canonical.com hardy/partner Sources [3537B]
Get:11 http://archive.ubuntu.com hardy/main Packages [1178kB]
Get:12 http://archive.ubuntu.com hardy/restricted Packages [6986B]
Get:13 http://archive.ubuntu.com hardy/main Sources [338kB]
Get:14 http://archive.ubuntu.com hardy/restricted Sources [1488B]
Get:15 http://archive.ubuntu.com hardy/universe Packages [4293kB]
Get:16 http://archive.ubuntu.com hardy/universe Sources [1323kB]
Get:17 http://archive.ubuntu.com hardy/multiverse Packages [179kB]
Get:18 http://archive.ubuntu.com hardy/multiverse Sources [60.9kB]
Get:19 http://archive.ubuntu.com hardy-updates/main Packages [486kB]
Get:20 http://archive.ubuntu.com hardy-updates/restricted Packages [9914B]
Get:21 http://archive.ubuntu.com hardy-updates/main Sources [122kB]
Get:22 http://archive.ubuntu.com hardy-updates/restricted Sources [946B]
Get:23 http://archive.ubuntu.com hardy-updates/universe Packages [229kB]
Get:24 http://archive.ubuntu.com hardy-updates/universe Sources [47.0kB]
Get:25 http://archive.ubuntu.com hardy-updates/multiverse Packages [29.3kB]
Get:26 http://archive.ubuntu.com hardy-updates/multiverse Sources [5233B]
Get:27 http://archive.ubuntu.com hardy-security/main Packages [206kB]
Get:28 http://archive.ubuntu.com hardy-security/restricted Packages [9949B]
Get:29 http://archive.ubuntu.com hardy-security/main Sources [35.3kB]
Get:30 http://archive.ubuntu.com hardy-security/restricted Sources [946B]
Get:31 http://archive.ubuntu.com hardy-security/universe Packages [106kB]
Get:32 http://archive.ubuntu.com hardy-security/universe Sources [16.8kB]
Get:33 http://archive.ubuntu.com hardy-security/multiverse Packages [12.2kB]
Get:34 http://archive.ubuntu.com hardy-security/multiverse Sources [1114B]
Fetched 8903kB in 1min14s (119kB/s)
Reading package lists... Done
martino@Aopen:~$ sudo dpkg --clear-avail
martino@Aopen:~$ sudo dpkg --configure -a
martino@Aopen:~$ LANG=C;sudo aptitude install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
The following packages are unused and will be REMOVED:
  libdns35
The following packages have been automatically kept back:
  language-pack-it-base libdns36 libisc35 libthai-data libthai0
The following packages have been kept back:
  base-files bind9-host dnsutils fuse-utils gzip klibc-utils
  language-pack-en language-pack-en-base language-pack-it libbind9-30
  libexpat1 libfuse2 libisccc30 libisccfg30 libklibc libkrb53 liblwres30
  libssl0.9.8 openssl python2.5 python2.5-minimal samba-common smbclient
0 packages upgraded, 0 newly installed, 1 to remove and 28 not upgraded.
Need to get 0B of archives. After unpacking 41.0kB will be freed.
Do you want to continue? [Y/n/?] Y
(Reading database ... 177761 files and directories currently installed.)
Removing libdns35 ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done
Building tag database... Done
martino@Aopen:~$ LANG=C;sudo aptitude update
Hit http://archive.canonical.com hardy Release.gpg
Hit http://archive.ubuntu.com hardy Release.gpg
Hit http://archive.ubuntu.com hardy-updates Release.gpg
Hit http://archive.canonical.com hardy Release
Hit http://archive.ubuntu.com hardy-security Release.gpg
Hit http://archive.ubuntu.com hardy Release
Hit http://archive.ubuntu.com hardy-updates Release
Hit http://archive.ubuntu.com hardy-security Release
Hit http://archive.canonical.com hardy/partner Packages
Hit http://archive.ubuntu.com hardy/main Packages
Hit http://archive.canonical.com hardy/partner Sources
Hit http://archive.ubuntu.com hardy/restricted Packages
Hit http://archive.ubuntu.com hardy/main Sources
Hit http://archive.ubuntu.com hardy/restricted Sources
Hit http://archive.ubuntu.com hardy/universe Packages
Hit http://archive.ubuntu.com hardy/universe Sources
Hit http://archive.ubuntu.com hardy/multiverse Packages
Hit http://archive.ubuntu.com hardy/multiverse Sources
Hit http://archive.ubuntu.com hardy-updates/main Packages
Hit http://archive.ubuntu.com hardy-updates/restricted Packages
Hit http://archive.ubuntu.com hardy-updates/main Sources
Hit http://archive.ubuntu.com hardy-updates/restricted Sources
Hit http://archive.ubuntu.com hardy-updates/universe Packages
Hit http://archive.ubuntu.com hardy-updates/universe Sources
Hit http://archive.ubuntu.com hardy-updates/multiverse Packages
Hit http://archive.ubuntu.com hardy-updates/multiverse Sources
Hit http://archive.ubuntu.com hardy-security/main Packages
Hit http://archive.ubuntu.com hardy-security/restricted Packages
Hit http://archive.ubuntu.com hardy-security/main Sources
Hit http://archive.ubuntu.com hardy-security/restricted Sources
Hit http://archive.ubuntu.com hardy-security/universe Packages
Hit http://archive.ubuntu.com hardy-security/universe Sources
Hit http://archive.ubuntu.com hardy-security/multiverse Packages
Hit http://archive.ubuntu.com hardy-security/multiverse Sources
Reading package lists... Done
martino@Aopen:~$ LANG=C;sudo aptitude dist-upgrade
Reading package lists... Done
Building dependency tree... 50%
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
The following packages will be upgraded:
  base-files bind9-host dnsutils fuse-utils gzip klibc-utils
  language-pack-en language-pack-en-base language-pack-it
  language-pack-it-base libbind9-30 libdns36 libexpat1 libfuse2 libisc35
  libisccc30 libisccfg30 libklibc libkrb53 liblwres30 libssl0.9.8
  libthai-data libthai0 openssl python2.5 python2.5-minimal samba-common
  smbclient
28 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 19.6MB of archives. After unpacking 815kB will be freed.
Writing extended state information... Done
Get:1 http://archive.ubuntu.com hardy-updates/main gzip 1.3.12-3.2ubuntu0.1 [101kB]
Get:2 http://archive.ubuntu.com hardy-updates/main base-files 4.0.1ubuntu5.8.04.8 [60.6kB]
Get:3 http://archive.ubuntu.com hardy-updates/main language-pack-en 1:8.04+20100117 [2012B]
Get:4 http://archive.ubuntu.com hardy-updates/main language-pack-en-base 1:8.04+20100117 [643kB]
Get:5 http://archive.ubuntu.com hardy-updates/main language-pack-it 1:8.04+20100117 [2032B]
Get:6 http://archive.ubuntu.com hardy-updates/main language-pack-it-base 1:8.04+20100117 [1767kB]
Get:7 http://archive.ubuntu.com hardy-updates/main libssl0.9.8 0.9.8g-4ubuntu3.9 [2831kB]
Get:8 http://archive.ubuntu.com hardy-updates/main python2.5 2.5.2-2ubuntu6.1 [2899kB]
Get:9 http://archive.ubuntu.com hardy-updates/main python2.5-minimal 2.5.2-2ubuntu6.1 [1176kB]
Get:10 http://archive.ubuntu.com hardy-updates/main klibc-utils 1.5.7-4ubuntu5 [140kB]
Get:11 http://archive.ubuntu.com hardy-updates/main libklibc 1.5.7-4ubuntu5 [45.7kB]
Get:12 http://archive.ubuntu.com hardy-updates/main bind9-host 1:9.4.2.dfsg.P2-2ubuntu0.5 [57.3kB]
Get:13 http://archive.ubuntu.com hardy-updates/main dnsutils 1:9.4.2.dfsg.P2-2ubuntu0.5 [136kB]
Get:14 http://archive.ubuntu.com hardy-updates/main libisc35 1:9.4.2.dfsg.P2-2ubuntu0.5 [127kB]
Get:15 http://archive.ubuntu.com hardy-updates/main libdns36 1:9.4.2.dfsg.P2-2ubuntu0.5 [494kB]
Get:16 http://archive.ubuntu.com hardy-updates/main libisccc30 1:9.4.2.dfsg.P2-2ubuntu0.5 [23.7kB]
Get:17 http://archive.ubuntu.com hardy-updates/main libisccfg30 1:9.4.2.dfsg.P2-2ubuntu0.5 [39.0kB]
Get:18 http://archive.ubuntu.com hardy-updates/main liblwres30 1:9.4.2.dfsg.P2-2ubuntu0.5 [40.8kB]
Get:19 http://archive.ubuntu.com hardy-updates/main libbind9-30 1:9.4.2.dfsg.P2-2ubuntu0.5 [28.1kB]
Get:20 http://archive.ubuntu.com hardy-updates/main libkrb53 1.6.dfsg.3~beta1-2ubuntu1.3 [460kB]
Get:21 http://archive.ubuntu.com hardy-updates/main fuse-utils 2.7.2-1ubuntu2.1 [20.7kB]
Get:22 http://archive.ubuntu.com hardy-updates/main libfuse2 2.7.2-1ubuntu2.1 [125kB]
Get:23 http://archive.ubuntu.com hardy-updates/main libexpat1 2.0.1-0ubuntu1.1 [66.2kB]
Get:24 http://archive.ubuntu.com hardy-updates/main libthai-data 0.1.9-1ubuntu0.2 [164kB]
Get:25 http://archive.ubuntu.com hardy-updates/main libthai0 0.1.9-1ubuntu0.2 [32.8kB]
Get:26 http://archive.ubuntu.com hardy-updates/main openssl 0.9.8g-4ubuntu3.9 [385kB]
Get:27 http://archive.ubuntu.com hardy-updates/main smbclient 3.0.28a-1ubuntu4.10 [4864kB]
Get:28 http://archive.ubuntu.com hardy-updates/main samba-common 3.0.28a-1ubuntu4.10 [2841kB]
Fetched 19.6MB in 35s (556kB/s)
Preconfiguring packages ...
(Reading database ... 177759 files and directories currently installed.)
Preparing to replace gzip 1.3.12-3.2 (using .../gzip_1.3.12-3.2ubuntu0.1_i386.deb) ...
Unpacking replacement gzip ...
Setting up gzip (1.3.12-3.2ubuntu0.1) ...

(Reading database ... 177759 files and directories currently installed.)
Preparing to replace base-files 4.0.1ubuntu5.8.04.7 (using .../base-files_4.0.1ubuntu5.8.04.8_i386.deb) ...
Unpacking replacement base-files ...
Setting up base-files (4.0.1ubuntu5.8.04.8) ...
Installing new version of config file /etc/issue ...
Installing new version of config file /etc/issue.net ...
Installing new version of config file /etc/lsb-release ...

(Reading database ... 177759 files and directories currently installed.)
Preparing to replace language-pack-en 1:8.04+20090402 (using .../language-pack-en_1%3a8.04+20100117_all.deb) ...
Unpacking replacement language-pack-en ...
Preparing to replace language-pack-en-base 1:8.04+20090105 (using .../language-pack-en-base_1%3a8.04+20100117_all.deb) ...
Unpacking replacement language-pack-en-base ...
Preparing to replace language-pack-it 1:8.04+20090402 (using .../language-pack-it_1%3a8.04+20100117_all.deb) ...
Unpacking replacement language-pack-it ...
Preparing to replace language-pack-it-base 1:8.04+20090105 (using .../language-pack-it-base_1%3a8.04+20100117_all.deb) ...
Unpacking replacement language-pack-it-base ...
Preparing to replace libssl0.9.8 0.9.8g-4ubuntu3.8 (using .../libssl0.9.8_0.9.8g-4ubuntu3.9_i386.deb) ...
Unpacking replacement libssl0.9.8 ...
Preparing to replace python2.5 2.5.2-2ubuntu6 (using .../python2.5_2.5.2-2ubuntu6.1_i386.deb) ...
Unpacking replacement python2.5 ...
Preparing to replace python2.5-minimal 2.5.2-2ubuntu6 (using .../python2.5-minimal_2.5.2-2ubuntu6.1_i386.deb) ...
Unpacking replacement python2.5-minimal ...
Setting up python2.5-minimal (2.5.2-2ubuntu6.1) ...

(Reading database ... 177767 files and directories currently installed.)
Preparing to replace klibc-utils 1.5.7-4ubuntu4 (using .../klibc-utils_1.5.7-4ubuntu5_i386.deb) ...
Unpacking replacement klibc-utils ...
Preparing to replace libklibc 1.5.7-4ubuntu4 (using .../libklibc_1.5.7-4ubuntu5_i386.deb) ...
Unpacking replacement libklibc ...
Preparing to replace bind9-host 1:9.4.2.dfsg.P2-2ubuntu0.4 (using .../bind9-host_1%3a9.4.2.dfsg.P2-2ubuntu0.5_i386.deb) ...
Unpacking replacement bind9-host ...
Preparing to replace dnsutils 1:9.4.2.dfsg.P2-2ubuntu0.4 (using .../dnsutils_1%3a9.4.2.dfsg.P2-2ubuntu0.5_i386.deb) ...
Unpacking replacement dnsutils ...
Preparing to replace libisc35 1:9.4.2.dfsg.P2-2ubuntu0.4 (using .../libisc35_1%3a9.4.2.dfsg.P2-2ubuntu0.5_i386.deb) ...
Unpacking replacement libisc35 ...
Preparing to replace libdns36 1:9.4.2.dfsg.P2-2ubuntu0.4 (using .../libdns36_1%3a9.4.2.dfsg.P2-2ubuntu0.5_i386.deb) ...
Unpacking replacement libdns36 ...
Preparing to replace libisccc30 1:9.4.2.dfsg.P2-2ubuntu0.4 (using .../libisccc30_1%3a9.4.2.dfsg.P2-2ubuntu0.5_i386.deb) ...
Unpacking replacement libisccc30 ...
Preparing to replace libisccfg30 1:9.4.2.dfsg.P2-2ubuntu0.4 (using .../libisccfg30_1%3a9.4.2.dfsg.P2-2ubuntu0.5_i386.deb) ...
Unpacking replacement libisccfg30 ...
Preparing to replace liblwres30 1:9.4.2.dfsg.P2-2ubuntu0.4 (using .../liblwres30_1%3a9.4.2.dfsg.P2-2ubuntu0.5_i386.deb) ...
Unpacking replacement liblwres30 ...
Preparing to replace libbind9-30 1:9.4.2.dfsg.P2-2ubuntu0.4 (using .../libbind9-30_1%3a9.4.2.dfsg.P2-2ubuntu0.5_i386.deb) ...
Unpacking replacement libbind9-30 ...
Preparing to replace libkrb53 1.6.dfsg.3~beta1-2ubuntu1.1 (using .../libkrb53_1.6.dfsg.3~beta1-2ubuntu1.3_i386.deb) ...
Unpacking replacement libkrb53 ...
Preparing to replace fuse-utils 2.7.2-1ubuntu2 (using .../fuse-utils_2.7.2-1ubuntu2.1_i386.deb) ...
Unpacking replacement fuse-utils ...
Preparing to replace libfuse2 2.7.2-1ubuntu2 (using .../libfuse2_2.7.2-1ubuntu2.1_i386.deb) ...
Unpacking replacement libfuse2 ...
Preparing to replace libexpat1 2.0.1-0ubuntu1 (using .../libexpat1_2.0.1-0ubuntu1.1_i386.deb) ...
Unpacking replacement libexpat1 ...
Preparing to replace libthai-data 0.1.9-1 (using .../libthai-data_0.1.9-1ubuntu0.2_all.deb) ...
Unpacking replacement libthai-data ...
Preparing to replace libthai0 0.1.9-1 (using .../libthai0_0.1.9-1ubuntu0.2_i386.deb) ...
Unpacking replacement libthai0 ...
Preparing to replace openssl 0.9.8g-4ubuntu3.8 (using .../openssl_0.9.8g-4ubuntu3.9_i386.deb) ...
Unpacking replacement openssl ...
Preparing to replace smbclient 3.0.28a-1ubuntu4.9 (using .../smbclient_3.0.28a-1ubuntu4.10_i386.deb) ...
Unpacking replacement smbclient ...
Preparing to replace samba-common 3.0.28a-1ubuntu4.9 (using .../samba-common_3.0.28a-1ubuntu4.10_i386.deb) ...
Unpacking replacement samba-common ...
Setting up libssl0.9.8 (0.9.8g-4ubuntu3.9) ...

Setting up python2.5 (2.5.2-2ubuntu6.1) ...

Setting up libklibc (1.5.7-4ubuntu5) ...
Setting up klibc-utils (1.5.7-4ubuntu5) ...
Setting up libisc35 (1:9.4.2.dfsg.P2-2ubuntu0.5) ...

Setting up libdns36 (1:9.4.2.dfsg.P2-2ubuntu0.5) ...

Setting up libisccc30 (1:9.4.2.dfsg.P2-2ubuntu0.5) ...

Setting up libisccfg30 (1:9.4.2.dfsg.P2-2ubuntu0.5) ...

Setting up libbind9-30 (1:9.4.2.dfsg.P2-2ubuntu0.5) ...

Setting up liblwres30 (1:9.4.2.dfsg.P2-2ubuntu0.5) ...

Setting up bind9-host (1:9.4.2.dfsg.P2-2ubuntu0.5) ...
Setting up dnsutils (1:9.4.2.dfsg.P2-2ubuntu0.5) ...

Setting up libkrb53 (1.6.dfsg.3~beta1-2ubuntu1.3) ...

Setting up libfuse2 (2.7.2-1ubuntu2.1) ...

Setting up fuse-utils (2.7.2-1ubuntu2.1) ...
creating fuse group...
update-initramfs: deferring update (trigger activated)

Setting up libexpat1 (2.0.1-0ubuntu1.1) ...

Setting up libthai-data (0.1.9-1ubuntu0.2) ...
Setting up libthai0 (0.1.9-1ubuntu0.2) ...

Setting up openssl (0.9.8g-4ubuntu3.9) ...

Setting up samba-common (3.0.28a-1ubuntu4.10) ...

Setting up smbclient (3.0.28a-1ubuntu4.10) ...
Setting up language-pack-it (1:8.04+20100117) ...
Setting up language-pack-en (1:8.04+20100117) ...
Setting up language-pack-it-base (1:8.04+20100117) ...
Generating locales...
  it_CH.UTF-8... done
  it_IT.UTF-8... done
Generation complete.
 * Reloading GNOME Display Manager configuration... * Changes will take effect when all current X sessions have ended.
                                                                         [ OK ]

Setting up language-pack-en-base (1:8.04+20100117) ...
Generating locales...
  en_AG.UTF-8... cannot open locale definition file `en_AG': No such file or directory
failed
  en_AU.UTF-8... done
  en_BW.UTF-8... done
  en_CA.UTF-8... done
  en_DK.UTF-8... done
  en_GB.UTF-8... done
  en_HK.UTF-8... done
  en_IE.UTF-8... done
  en_IN.UTF-8... done
  en_NG.UTF-8... done
  en_NZ.UTF-8... done
  en_PH.UTF-8... done
  en_SG.UTF-8... done
  en_US.UTF-8... done
  en_ZA.UTF-8... done
  en_ZW.UTF-8... done
Generation complete.
 * Reloading GNOME Display Manager configuration... * Changes will take effect when all current X sessions have ended.
                                                                         [ OK ]

Processing triggers for libc6 ...
ldconfig deferred processing now taking place
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-2.6.24-26-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
martino@Aopen:~$

Revision history for this message
Best Mark Rijckenberg (markrijckenberg) said :
#4

Looks fine now. Can you confirm that the Synaptic issue is solved now?

Revision history for this message
Martino (martino-bello) said :
#5

Hi Mark,

      it seems work fine: there are no upgrade avaulables now, but synaptic doesn't have any problems!

Thank you very much!

bye,

Martino.