我安装了 Java 7,后来系统出现问题,无法再更新。软件包系统已损坏。
检查您是否正在使用第三方存储库。如果是,请禁用它们,因为它们是问题的常见来源。此外,在终端中运行以下命令:
sudo dpkg --check
==> 没有结果,无法识别命令sudo apt-get check
Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies: libc6 : Depends: libgcc1 but it is not installed Depends: tzdata but it is not installed E: Unmet dependencies. Try using -f.
apt-cache policy debconf
debconf: Installed: (none) Candidate: 1.5.42ubuntu1 Version table: 1.5.42ubuntu1 0 500 http://archive.ubuntu.com/ubuntu/ precise/main i386 Packages
apt-get install -f
The following packages have unmet dependencies: libc6: Depends: libc-bin (= 2.15-0ubuntu10.5) but 2.15-0ubuntu10.5 is installed Depends: libgcc1 but it is not installed Depends: tzdata but it is not installed sudo apt-get install -f 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/9303 kB of archives. After this operation, 29.7 MB of additional disk space will be used. Do you want to continue [Y/n]? y perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_TIME = "de_CH.UTF-8", LC_MONETARY = "de_CH.UTF-8", LC_ADDRESS = "de_CH.UTF-8", LC_TELEPHONE = "de_CH.UTF-8", LC_NAME = "de_CH.UTF-8", LC_MEASUREMENT = "de_CH.UTF-8", LC_IDENTIFICATION = "de_CH.UTF-8", LC_NUMERIC = "de_CH.UTF-8", LC_PAPER = "de_CH.UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). locale: Cannot set LC_ALL to default locale: No such file or directory 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 No apport report written because MaxReports is reached already 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)
答案1
如果coreutils
没有安装,您的系统将受到严重损害。
是否/bin/date
存在并且有效?如果是,则“只是”您的软件包数据库已损坏。在这种情况下,请/var/lib/dpkg/status
从备份中恢复 - 例如/var/lib/dpkg/status-old
或其中一个文件/var/backups/dpkg.status.*
(记得解压*.gz
文件)。