dpkg 或者相关的东西损坏了?

dpkg 或者相关的东西损坏了?

Ubuntu 版本 10.04 LTS

我在使用软件包管理系统时遇到了问题。由于 RAM 故障,我升级失败。我更换了故障 RAM,但现在尝试安装某些软件包时遇到了问题。以下是我尝试安装/重新安装 samba 时遇到的问题,例如:

mleschishin@borealis-ubuntu1:~$ sudo apt-get --reinstall install samba
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  smbldap-tools ldb-tools
The following NEW packages will be installed:
  samba
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 6,266kB of archives.
After this operation, 17.1MB of additional disk space will be used.
Get:1 http://ca.archive.ubuntu.com/ubuntu/ lucid-updates/main samba 2:3.4.7~dfsg-1ubuntu3.13 [6,266kB]
Fetched 6,266kB in 19s (316kB/s)                                               
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 81, <> line 1.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 39, <> line 1.
Preconfiguring packages ...
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 81, <GEN1> line 2.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 39, <GEN1> line 2.
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 81, <GEN1> line 3.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 39, <GEN1> line 3.
Can't call method "i18n" on an undefined value at /usr/share/perl5/Debconf/Element/Noninteractive/Select.pm line 13, <GEN1> line 3.
Selecting previously deselected package samba.
(Reading database ... 266813 files and directories currently installed.)
Unpacking samba (from .../samba_2%3a3.4.7~dfsg-1ubuntu3.13_i386.deb) ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Processing triggers for ufw ...
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 81.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 39.
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 81, <GEN1> line 4.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 39, <GEN1> line 4.
Processing triggers for man-db ...
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 81.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 39.
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 81, <GEN1> line 2.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 39, <GEN1> line 2.
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 81, <GEN6> line 2.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 39, <GEN6> line 2.
Setting up samba (2:3.4.7~dfsg-1ubuntu3.13) ...
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 81.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 39.
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 81, <GEN1> line 2.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 39, <GEN1> line 2.
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 81, <GEN1> line 3.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 39, <GEN1> line 3.
Can't call method "i18n" on an undefined value at /usr/share/perl5/Debconf/Element/Noninteractive/Select.pm line 13, <GEN1> line 3.
dpkg: error processing samba (--configure):
 subprocess installed post-installation script returned error exit status 9
Errors were encountered while processing:
 samba
E: Sub-process /usr/bin/dpkg returned an error code (1)

这是发出 sudo dpkg –audit 时报告的内容

mleschishin@borealis-ubuntu1:~$ sudo dpkg --audit
The following packages are only half configured, probably due to problems
configuring them the first time.  The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
 samba                SMB/CIFS file, print, and login server for Unix

这是按照说明尝试配置 Samba 时报告的内容:

mleschishin@borealis-ubuntu1:~$ sudo dpkg --configure samba
Setting up samba (2:3.4.7~dfsg-1ubuntu3.13) ...
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 81.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 39.
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 81, <GEN1> line 2.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 39, <GEN1> line 2.
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 81, <GEN1> line 3.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 39, <GEN1> line 3.
Can't call method "i18n" on an undefined value at /usr/share/perl5/Debconf/Element/Noninteractive/Select.pm line 13, <GEN1> line 3.
dpkg: error processing samba (--configure):
 subprocess installed post-installation script returned error exit status 9
Errors were encountered while processing:
 samba

我尝试了几个命令来清理所有内容(clean/autoclean/remove/autoremove 等)并修复所有损坏的软件包。Synaptic 没有报告任何损坏的内容。这个问题似乎还阻止我重新配置其他软件包(例如尝试重新配置 xserver-xorg)。

需要注意的另外一点:我在安装 Acrobat Reader 时遇到了同样的错误。有趣的是,尽管 dpkg –audit 报告了配置问题,但 Acrobat Reader 应用程序似乎运行正常。

我浏览了论坛,但找不到该问题的明确解决方案。我想在尝试全面升级到 12.04 LTS 之前解决这个问题。有人能帮忙吗?

答案1

正如上面评论部分所建议的那样,运行

/usr/share/debconf/fix_db.pl 

以 root 身份确实解决了这个问题。我重新启动系统,然后安装了另一个软件包。在安装过程中,部分配置的软件包已完全配置。发出

sudo dpkg –audit 

没有返回任何错误。

相关内容