软件包系统损坏,出现多个错误,dpkg 无法处理 libc6

软件包系统损坏,出现多个错误,dpkg 无法处理 libc6

更新管理器弹出的内容如下:

The following packages have unmet dependencies:

libc6: Depends: libc-bin (= 2.15-0ubuntu10.4) but 2.15-0ubuntu10.4 is installed
       Depends: libgcc1 but it is not installed
       Depends: tzdata but it is not installed

编辑:

sudo apt-get -f install

返回:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  apt-utils coreutils debconf debconf-i18n dpkg libacl1 libapt-inst1.4
  libapt-pkg4.12 libattr1 libbz2-1.0 libdb5.1 libgcc1 liblocale-gettext-perl
  liblzma5 libselinux1 libstdc++6 libtext-charwidth-perl libtext-iconv-perl
  libtext-wrapi18n-perl perl-base tar tzdata xz-utils zlib1g
Suggested packages:
  debconf-doc debconf-utils whiptail dialog gnome-utils
  libterm-readline-gnu-perl libgtk2-perl libnet-ldap-perl libqtgui4-perl
  libqtcore4-perl apt bzip2 ncompress xz-lzma
The following NEW packages will be installed:
  apt-utils coreutils debconf debconf-i18n dpkg libacl1 libapt-inst1.4
  libapt-pkg4.12 libattr1 libbz2-1.0 libdb5.1 libgcc1 liblocale-gettext-perl
  liblzma5 libselinux1 libstdc++6 libtext-charwidth-perl libtext-iconv-perl
  libtext-wrapi18n-perl perl-base tar tzdata xz-utils zlib1g
0 upgraded, 24 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/9,304 kB of archives.
After this operation, 29.7 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
dpkg: regarding .../libgcc1_1%3a4.6.3-1ubuntu5_i386.deb containing libgcc1, pre- dependency problem:
 libgcc1 pre-depends on multiarch-support
  multiarch-support is unpacked, but has never been configured.
dpkg: error processing /var/cache/apt/archives/libgcc1_1%3a4.6.3-1ubuntu5_i386.deb (-   -unpack):
 pre-dependency problem - not installing libgcc1
Errors were encountered while processing:
 /var/cache/apt/archives/libgcc1_1%3a4.6.3-1ubuntu5_i386.deb
E: Internal Error, No file name for libc6
W: Could not perform immediate configuration on 'multiarch-support:i386'. Please see  man 5 apt.conf under APT::Immediate-Configure for details. (2)
E: Sub-process /usr/bin/dpkg returned an error code (1)

sudo dpkg --configure -a返回

dpkg: dependency problems prevent configuration of libc6:
 libc6 depends on libgcc1; however:
  Package libgcc1 is not installed.
 libc6 depends on tzdata; however:
  Package tzdata is not installed.
dpkg: error processing libc6 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of multiarch-support:
 multiarch-support depends on libc6 (>= 2.13-0ubuntu6); however:
  Package libc6 is not configured yet.
dpkg: error processing multiarch-support (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libc6

答案1

当出现此错误时:

E: Internal Error, No file name for libc6

根据启动板中的一个错误,运行这些命令将修复它(并且它也对我有用):

sudo apt-get update
sudo apt-get clean
sudo apt-get install -fy
sudo dpkg -i /var/cache/apt/archives/*.deb
sudo dpkg --configure -a
sudo apt-get install -fy
sudo apt-get dist-upgrade

更具体地说,对我来说,这个命令做到了:

sudo dpkg --configure -a

相关内容