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

dpkg database corrupted, with a twist (correctly formatted)



Sorry for the junk characters in the previous message.  This repost is 
easier to read.

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 having
getting errors installing and removing packages.  

From 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

-- begin typescript --
Script started on Thu Nov 27 13:20:04 2003
shiznit:~# s dpkg -l vs  cvs
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/
Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: 
uppercase=bad)
||/ Name                      Version                   Description
++
+-=========================-=========================-========================
iF  cvs                       1.12.2-2                  Concurrent 
Versions Syst
shiznit:~# aptitude purge cvs
Reading Package Lists...
Building Dependency Tree...
Reading extended state information...
The following packages have been kept back:
  kdebase ksysguard ksysguardd 
The following packages will be REMOVED:
  cvs 
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/?] 
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/Cache.
Use of uninitialized value in exists at /usr/share/perl5/Debconf/
DbDriver/Cache.
Use of uninitialized value in exists at /usr/share/perl5/Debconf/
DbDriver/Cache.
(amax: This error message is repeated 331 more times here)

Reading Package Lists... 
Building Dependency Tree...
Reading extended state information...
shiznit:~# dpkg -l cvs
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/
Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: 
uppercase=bad)
||/ Name                      Version                   Description
++
+-=========================-=========================-========================
pn  cvs                       <none>                    (no description 
availabl
shiznit:~# aptitude install cvs
Reading Package Lists...
Building Dependency Tree...
Reading extended state information...
The following packages have been kept back:
  kdebase ksysguard ksysguardd 
The following NEW packages will be installed:
  cvs 
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/Cache.
Preconfiguring packages ...
debconf: warning: possible database corruption. Will attempt to repair 
by adding
Use of uninitialized value in exists at /usr/share/perl5/Debconf/
Template.pm lin
Use of uninitialized value in exists at /usr/share/perl5/Debconf/
DbDriver/Cache.
Use of uninitialized value in exists at /usr/share/perl5/Debconf/
Template.pm lin
Use of uninitialized value in exists at /usr/share/perl5/Debconf/
DbDriver/Cache.
Can't call method "extended_description" on an undefined value at /usr/
share/per
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/Cache.
debconf: warning: possible database corruption. Will attempt to repair 
by adding
Use of uninitialized value in exists at /usr/share/perl5/Debconf/
Template.pm lin
Use of uninitialized value in exists at /usr/share/perl5/Debconf/
DbDriver/Cache.
Use of uninitialized value in exists at /usr/share/perl5/Debconf/
Template.pm lin
Use of uninitialized value in exists at /usr/share/perl5/Debconf/
DbDriver/Cache.
Can't call method "extended_description" on an undefined value at /usr/
share/per
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/Cache.
debconf: warning: possible database corruption. Will attempt to repair 
by adding
Use of uninitialized value in exists at /usr/share/perl5/Debconf/
Template.pm lin
Use of uninitialized value in exists at /usr/share/perl5/Debconf/
DbDriver/Cache.
Use of uninitialized value in exists at /usr/share/perl5/Debconf/
Template.pm lin
Use of uninitialized value in exists at /usr/share/perl5/Debconf/
DbDriver/Cache.
Can't call method "extended_description" on an undefined value at /usr/
share/per
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%
Reading Pac
Building Dependency Tree... 0%Building Dependency Tree... 0%Building 
Dependency 
Reading extended state information... 0%Reading extended state 
information... 0%
shiznit:~# dpkg -l cvs
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/
Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: 
uppercase=bad)
||/ Name                      Version                   Description
++
+-=========================-=========================-========================
iF  cvs                       1.12.2-2                  Concurrent 
Versions Syst
shiznit:~# 
Script done on Thu Nov 27 13:21:13 2003
-- end typescript --



-- 
Best,
Aaron
http://redsymbol.com



Reply to: