[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

dpkg database corrupted, with a twist



Date: Mon, 1 Dec 2003 09:48:20 -0800
User-Agent: KMail/1.5.4
MIME-Version: 1.0
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Message-Id: <200312010948.20366.amax@redsymbol.com>
Status: RO
X-Status: Q
X-KMail-EncryptionState:  
X-KMail-SignatureState:  

Hi.  I'm running last week's sarge.  I unfortunately had to reboot my
box in the middle of an aptitude dist-upgrade.  Now I am getting=20
errors installing and removing packages. =20

=46rom the error messages, it looks to me like the dpkg database has
been corrupted (though, I'm not totally clear on what the "dpkg
database" is).  If this is indeed the case, the suggested fix (from
the mailing list archives) is to first replace /var/lib/dpkg/status
with the most recent good version of /var/backups/dpkg.status.?.gz .
This would result (in my case) in the dpkg database thinking that some
packages are installed when in fact they are not, or are at a newer
version.  The way to fix this is to remove and then install each
of these packages.  One of the packages that was upgraded on my system
is libc6, which I cannot safely remove.  Also, many packages were
upgraded in this dist-upgrade, and re-installing them all by hand
would be tedious.

I've included a typescript that succinctly demonstrates what's
happening.  In the script, I have aptitude purge'd and then aptitude
install'ed the cvs package.  Notice that there are errors and warnings
from /usr/share/perl5/Debconf/[*/]*.pm, particularly
/usr/share/perl5/Debconf/DbDriver/Cache.pm .

I'd appreciate any thoughts on how to proceed, or comments on whether
my understanding so far is correct. Is there some way that I can
regenerate /var/lib/dpkg/status, or repair it?  Would that solve the
problem?

Thanks in advance.

Aaron
amax@redsymbol.com

=2D- begin typescript --
Script started on Thu Nov 27 13:20:04 2003
shiznit:~# s dpkg -l vs  cvs
Desired=3DUnknown/Install/Remove/Purge/Hold
| Status=3DNot/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=3D(none)/Hold/Reinst-required/X=3Dboth-problems (Status,Err: upperc=
ase=3Dbad)
||/ Name                      Version                   Description
+++-=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D-=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D-=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
iF  cvs                       1.12.2-2                  Concurrent Versions=
 System
shiznit:~# aptitude purge cvs
Reading Package Lists...
Building Dependency Tree...
Reading extended state information...
The following packages have been kept back:
  kdebase ksysguard ksysguardd=20
The following packages will be REMOVED:
  cvs=20
0 packages upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
Need to get 0B of archives. After unpacking 2826kB will be freed.
Do you want to continue? [Y/n/?]=20
Writing extended state information...
(Reading database ... 80926 files and directories currently installed.)
Removing cvs ...
Purging configuration files for cvs ...
Use of uninitialized value in exists at /usr/share/perl5/Debconf/DbDriver/C=
ache.pm line 29.
Use of uninitialized value in exists at /usr/share/perl5/Debconf/DbDriver/C=
ache.pm line 29.
Use of uninitialized value in exists at /usr/share/perl5/Debconf/DbDriver/C=
ache.pm line 29.
(amax: This error message is repeated 331 more times here)

Reading Package Lists...=20
Building Dependency Tree...
Reading extended state information...
shiznit:~# dpkg -l cvs
Desired=3DUnknown/Install/Remove/Purge/Hold
| Status=3DNot/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=3D(none)/Hold/Reinst-required/X=3Dboth-problems (Status,Err: upperc=
ase=3Dbad)
||/ Name                      Version                   Description
+++-=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D-=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D-=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
pn  cvs                       <none>                    (no description ava=
ilable)
shiznit:~# aptitude install cvs
Reading Package Lists...
Building Dependency Tree...
Reading extended state information...
The following packages have been kept back:
  kdebase ksysguard ksysguardd=20
The following NEW packages will be installed:
  cvs=20
0 packages upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
Need to get 0B/1243kB of archives. After unpacking 2826kB will be used.
Do you want to continue? [Y/n/?] y
Writing extended state information...
Use of uninitialized value in exists at /usr/share/perl5/Debconf/DbDriver/C=
ache.pm line 29, <> line 1.
Preconfiguring packages ...
debconf: warning: possible database corruption. Will attempt to repair by a=
dding back missing question cvs.
Use of uninitialized value in exists at /usr/share/perl5/Debconf/Template.p=
m line 66, <GEN1> line 3.
Use of uninitialized value in exists at /usr/share/perl5/Debconf/DbDriver/C=
ache.pm line 29, <GEN1> line 3.
Use of uninitialized value in exists at /usr/share/perl5/Debconf/Template.p=
m line 66, <GEN1> line 4.
Use of uninitialized value in exists at /usr/share/perl5/Debconf/DbDriver/C=
ache.pm line 29, <GEN1> line 4.
Can't call method "extended_description" on an undefined value at /usr/shar=
e/perl5/Debconf/Question.pm line 80, <GEN1> line 4.
Selecting previously deselected package cvs.
(Reading database ... 80817 files and directories currently installed.)
Unpacking cvs (from .../cvs_1%3a1.12.2-2_i386.deb) ...
Setting up cvs (1.12.2-2) ...
Use of uninitialized value in exists at /usr/share/perl5/Debconf/DbDriver/C=
ache.pm line 29.
debconf: warning: possible database corruption. Will attempt to repair by a=
dding back missing question cvs.
Use of uninitialized value in exists at /usr/share/perl5/Debconf/Template.p=
m line 66, <GEN1> line 3.
Use of uninitialized value in exists at /usr/share/perl5/Debconf/DbDriver/C=
ache.pm line 29, <GEN1> line 3.
Use of uninitialized value in exists at /usr/share/perl5/Debconf/Template.p=
m line 66, <GEN1> line 4.
Use of uninitialized value in exists at /usr/share/perl5/Debconf/DbDriver/C=
ache.pm line 29, <GEN1> line 4.
Can't call method "extended_description" on an undefined value at /usr/shar=
e/perl5/Debconf/Question.pm line 80, <GEN1> line 4.
dpkg: error processing cvs (--configure):
 subprocess post-installation script returned error exit status 255
Errors were encountered while processing:
 cvs
E: Sub-process /usr/bin/dpkg returned an error code (1)
Ack!  Something bad happened while installing packages.  Trying to recover:
Setting up cvs (1.12.2-2) ...
Use of uninitialized value in exists at /usr/share/perl5/Debconf/DbDriver/C=
ache.pm line 29.
debconf: warning: possible database corruption. Will attempt to repair by a=
dding back missing question cvs.
Use of uninitialized value in exists at /usr/share/perl5/Debconf/Template.p=
m line 66, <GEN1> line 3.
Use of uninitialized value in exists at /usr/share/perl5/Debconf/DbDriver/C=
ache.pm line 29, <GEN1> line 3.
Use of uninitialized value in exists at /usr/share/perl5/Debconf/Template.p=
m line 66, <GEN1> line 4.
Use of uninitialized value in exists at /usr/share/perl5/Debconf/DbDriver/C=
ache.pm line 29, <GEN1> line 4.
Can't call method "extended_description" on an undefined value at /usr/shar=
e/perl5/Debconf/Question.pm line 80, <GEN1> line 4.
dpkg: error processing cvs (--configure):
 subprocess post-installation script returned error exit status 255
Errors were encountered while processing:
 cvs
Reading Package Lists... 0%               Reading Package Lists... 0%Readin=
g Package Lists... 1%Reading Package Lists... Done
Building Dependency Tree... 0%Building Dependency Tree... 0%Building Depend=
ency Tree... 0%Building Dependency Tree... 50%Building Dependency Tree... 5=
0%Building Dependency Tree... 99%Building Dependency Tree      =20
Reading extended state information... 0%Reading extended state information.=
=2E. 0%Reading extended state information... Done
shiznit:~# dpkg -l cvs
Desired=3DUnknown/Install/Remove/Purge/Hold
| Status=3DNot/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=3D(none)/Hold/Reinst-required/X=3Dboth-problems (Status,Err: upperc=
ase=3Dbad)
||/ Name                      Version                   Description
+++-=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D-=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D-=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
iF  cvs                       1.12.2-2                  Concurrent Versions=
 System
shiznit:~#=20
Script done on Thu Nov 27 13:21:13 2003
=2D- end typescript --

=2D-=20
Best,
Aaron
http://redsymbol.com



Reply to: