我尝试在 ubuntu 16.04 上安装 libc6_2.26-0ubuntu2.1_amd64.deb,但在执行 sudo apt-get -f install 后,apt 安装失败。现在我无法安装任何软件包。
这是我尝试时得到的sudo apt-get install aria2
结果
Can't set locale; make sure $LC_* and $LANG are correct!
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:",
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Can't exec "locale": No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16.
Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/share/perl5/Debconf/Encoding.pm line 17.
Setting up passwd (1:4.2-3.1ubuntu5.3) ...
/var/lib/dpkg/info/passwd.postinst: 21: /var/lib/dpkg/info/passwd.postinst: getent: not found
groupadd: group 'shadow' already exists
Group ID 42 has been allocated for the shadow group. You have either
used 42 yourself or created a shadow group with a different ID.
Please correct this problem and reconfigure with dpkg --configure passwd''.
Note that both user and group IDs in the range 0-99 are globally
allocated by the Debian project and must be the same on every Debian
system.
dpkg: error processing package passwd (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
passwd
E: Sub-process /usr/bin/dpkg returned an error code (1)
我在 Google 上搜索,但找不到如何解决此问题。帮助
这是 /var/log/apt/history.log 的结尾
Start-Date: 2019-05-01 16:38:47
Commandline: apt-get -u dist-upgrade
Requested-By: willy (1000)
Install: linux-modules-extra-4.4.0-145-generic:amd64 (4.4.0-145.171, automatic), python3-ndg-httpsclient:amd64 (0.4.2-1+certbot~xenial+1, automatic), linux-modules-4.4.0-145-generic:amd64 (4.4.0-145.171, automatic), linux-headers-4.4.0-145:amd64 (4.4.0-145.171, automatic), libc-bin:amd64 (2.23-0ubuntu10, automatic), linux-image-4.4.0-145-generic:amd64 (4.4.0-145.171, automatic), python3-pyasn1:amd64 (0.1.9-2+certbot~xenial+1, automatic), linux-headers-4.4.0-145-generic:amd64 (4.4.0-145.171, automatic)
Upgrade: libpolkit-gobject-1-0:amd64 (0.105-14.1ubuntu0.1, 0.105-14.1ubuntu0.5), libdns-export162:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11, 1:9.10.3.dfsg.P4-8ubuntu1.14), libkrb5-3:amd64 (1.13.2+dfsg-5ubuntu2, 1.13.2+dfsg-5ubuntu2.1), libgssapi-krb5-2:amd64 (1.13.2+dfsg-5ubuntu2, 1.13.2+dfsg-5ubuntu2.1), libisccfg140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11, 1:9.10.3.dfsg.P4-8ubuntu1.14), libcups2:amd64 (2.1.3-4ubuntu0.5, 2.1.3-4ubuntu0.6), linux-headers-generic:amd64 (4.4.0.139.145, 4.4.0.145.153), ureadahead:amd64 (0.100.0-19, 0.100.0-19.1), php7.0-xmlrpc:amd64 (7.0.32-0ubuntu0.16.04.1, 7.0.33-0ubuntu0.16.04.4), php7.0-cgi:amd64 (7.0.32-0ubuntu0.16.04.1, 7.0.33-0ubuntu0.16.04.4), php7.0-cli:amd64 (7.0.32-0ubuntu0.16.04.1, 7.0.33-0ubuntu0.16.04.4), libnss3-nssdb:amd64 (2:3.28.4-0ubuntu0.16.04.3, 2:3.28.4-0ubuntu0.16.04.5), libcurl3:amd64 (7.47.0-1ubuntu2.11, 7.47.0-1ubuntu2.12), python3-software-properties:amd64 (0.96.20.7, 0.96.20.8), openssl:amd64 (1.0.2g-1ubuntu4.13, 1.0.2g-1ubuntu4.15), ruby2.3:amd64 (2.3.1-2~16.04.11, 2.3.1-2~16.04.12), libgdk-pixbuf2.0-0:amd64 (2.32.2-1ubuntu1.5, 2.32.2-1ubuntu1.6), git-man:amd64 (1:2.7.4-0ubuntu1.5, 1:2.7.4-0ubuntu1.6), php7.0-gd:amd64 (7.0.32-0ubuntu0.16.04.1, 7.0.33-0ubuntu0.16.04.4), linux-image-generic:amd64 (4.4.0.139.145, 4.4.0.145.153), libgd3:amd64 (2.1.1-4ubuntu0.16.04.10, 2.1.1-4ubuntu0.16.04.11), libgs9:amd64 (9.25~dfsg+1-0ubuntu0.16.04.2, 9.26~dfsg+0-0ubuntu0.16.04.8), dovecot-lmtpd:amd64 (1:2.2.22-1ubuntu2.8, 1:2.2.22-1ubuntu2.10), dovecot-mysql:amd64 (1:2.2.22-1ubuntu2.8, 1:2.2.22-1ubuntu2.10), python3-josepy:amd64 (1.0.1-1+ubuntu16.04.1+certbot+7, 1.1.0-2+ubuntu16.04.1+certbot+1), nextcloud-client:amd64 (2.5.0-20181111.015125~xenial1, 2.5.2-20190319.015224~xenial1), mysql-server:amd64 (5.7.24-0ubuntu0.16.04.1, 5.7.26-0ubuntu0.16.04.1), libsqlite3-0:amd64 (3.11.0-1ubuntu1, 3.11.0-1ubuntu1.1), libirs141:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11, 1:9.10.3.dfsg.P4-8ubuntu1.14), certbot:amd64 (0.26.1-1+ubuntu16.04.1+certbot+2, 0.31.0-1+ubuntu16.04.1+certbot+1), bind9-host:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11, 1:9.10.3.dfsg.P4-8ubuntu1.14), php7.0-opcache:amd64 (7.0.32-0ubuntu0.16.04.1, 7.0.33-0ubuntu0.16.04.4), php7.0:amd64 (7.0.32-0ubuntu0.16.04.1, 7.0.33-0ubuntu0.16.04.4), php7.0-pspell:amd64 (7.0.32-0ubuntu0.16.04.1, 7.0.33-0ubuntu0.16.04.4), libavahi-common-data:amd64 (0.6.32~rc+dfsg-1ubuntu2.2, 0.6.32~rc+dfsg-1ubuntu2.3), dnsutils:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11, 1:9.10.3.dfsg.P4-8ubuntu1.14), libavahi-common3:amd64 (0.6.32~rc+dfsg-1ubuntu2.2, 0.6.32~rc+dfsg-1ubuntu2.3), php7.0-recode:amd64 (7.0.32-0ubuntu0.16.04.1, 7.0.33-0ubuntu0.16.04.4), apache2-suexec-pristine:amd64 (2.4.18-2ubuntu3.9, 2.4.18-2ubuntu3.10), console-setup-linux:amd64 (1.108ubuntu15.4, 1.108ubuntu15.5), php7.0-common:amd64 (7.0.32-0ubuntu0.16.04.1, 7.0.33-0ubuntu0.16.04.4), git:amd64 (1:2.7.4-0ubuntu1.5, 1:2.7.4-0ubuntu1.6), openssh-sftp-server:amd64 (1:7.2p2-4ubuntu2.6, 1:7.2p2-4ubuntu2.8), libpolkit-agent-1-0:amd64 (0.105-14.1ubuntu0.1, 0.105-14.1ubuntu0.5), libk5crypto3:amd64 (1.13.2+dfsg-5ubuntu2, 1.13.2+dfsg-5ubuntu2.1), libisc160:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11, 1:9.10.3.dfsg.P4-8ubuntu1.14), python-software-properties:amd64 (0.96.20.7, 0.96.20.8), console-setup:amd64 (1.108ubuntu15.4, 1.108ubuntu15.5), gstreamer1.0-plugins-base:amd64 (1.8.3-1ubuntu0.2, 1.8.3-1ubuntu0.3), dovecot-imapd:amd64 (1:2.2.22-1ubuntu2.8, 1:2.2.22-1ubuntu2.10), php7.0-sqlite3:amd64 (7.0.32-0ubuntu0.16.04.1, 7.0.33-0ubuntu0.16.04.4), bind9utils:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11, 1:9.10.3.dfsg.P4-8ubuntu1.14), libmagic1:amd64 (1:5.25-2ubuntu1.1, 1:5.25-2ubuntu1.2), dovecot-sieve:amd64 (1:2.2.22-1ubuntu2.8, 1:2.2.22-1ubuntu2.10), php-pear:amd64 (1:1.10.1+submodules+notgz-6, 1:1.10.1+submodules+notgz-6ubuntu0.1), php7.0-tidy:amd64 (7.0.32-0ubuntu0.16.04.1, 7.0.33-0ubuntu0.16.04.4), rsyslog:amd64 (8.16.0-1ubuntu3, 8.16.0-1ubuntu3.1), dovecot-pop3d:amd64 (1:2.2.22-1ubuntu2.8, 1:2.2.22-1ubuntu2.10), libqt5webenginewidgets5:amd64 (5.6.4-1~xenial4, 5.6.4-1~xenial6), krb5-locales:amd64 (1.13.2+dfsg-5ubuntu2, 1.13.2+dfsg-5ubuntu2.1), libnextcloudsync0:amd64 (2.5.0-20181111.015125~xenial1, 2.5.2-20190319.015224~xenial1), libtiff5:amd64 (4.0.6-1ubuntu0.4, 4.0.6-1ubuntu0.6), php7.0-json:amd64 (7.0.32-0ubuntu0.16.04.1, 7.0.33-0ubuntu0.16.04.4), dovecot-core:amd64 (1:2.2.22-1ubuntu2.8, 1:2.2.22-1ubuntu2.10), libisc-export160:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11, 1:9.10.3.dfsg.P4-8ubuntu1.14), p7zip-full:amd64 (9.20.1~dfsg.1-4.2, 9.20.1~dfsg.1-4.2ubuntu0.1), libsasl2-modules:amd64 (2.1.26.dfsg1-14build1, 2.1.26.dfsg1-14ubuntu0.1), clamav-docs:amd64 (0.100.2+dfsg-1ubuntu0.16.04.1, 0.100.3+dfsg-0ubuntu0.16.04.1), libruby2.3:amd64 (2.3.1-2~16.04.11, 2.3.1-2~16.04.12), php7.0-mbstring:amd64 (7.0.32-0ubuntu0.16.04.1, 7.0.33-0ubuntu0.16.04.4), php7.0-readline:amd64 (7.0.32-0ubuntu0.16.04.1, 7.0.33-0ubuntu0.16.04.4), php7.0-xml:amd64 (7.0.32-0ubuntu0.16.04.1, 7.0.33-0ubuntu0.16.04.4), libkrb5support0:amd64 (1.13.2+dfsg-5ubuntu2, 1.13.2+dfsg-5ubuntu2.1), libqt5webengine-data:amd64 (5.6.4-1~xenial4, 5.6.4-1~xenial6), php7.0-xsl:amd64 (7.0.32-0ubuntu0.16.04.1, 7.0.33-0ubuntu0.16.04.4), libcurl4-openssl-dev:amd64 (7.47.0-1ubuntu2.11, 7.47.0-1ubuntu2.12), php7.0-curl:amd64 (7.0.32-0ubuntu0.16.04.1, 7.0.33-0ubuntu0.16.04.4), php7.0-zip:amd64 (7.0.32-0ubuntu0.16.04.1, 7.0.33-0ubuntu0.16.04.4), liblwres141:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11, 1:9.10.3.dfsg.P4-8ubuntu1.14), python3-acme:amd64 (0.26.0-1+ubuntu16.04.1+certbot+1, 0.31.0-1+ubuntu16.04.1+certbot+1), php7.0-ldap:amd64 (7.0.32-0ubuntu0.16.04.1, 7.0.33-0ubuntu0.16.04.4), libgstreamer-plugins-base1.0-0:amd64 (1.8.3-1ubuntu0.2, 1.8.3-1ubuntu0.3), distro-info-data:amd64 (0.28ubuntu0.9, 0.28ubuntu0.11), clamav:amd64 (0.100.2+dfsg-1ubuntu0.16.04.1, 0.100.3+dfsg-0ubuntu0.16.04.1), php7.0-mcrypt:amd64 (7.0.32-0ubuntu0.16.04.1, 7.0.33-0ubuntu0.16.04.4), ghostscript:amd64 (9.25~dfsg+1-0ubuntu0.16.04.2, 9.26~dfsg+0-0ubuntu0.16.04.8), php7.0-imap:amd64 (7.0.32-0ubuntu0.16.04.1, 7.0.33-0ubuntu0.16.04.4), clamav-daemon:amd64 (0.100.2+dfsg-1ubuntu0.16.04.1, 0.100.3+dfsg-0ubuntu0.16.04.1), clamdscan:amd64 (0.100.2+dfsg-1ubuntu0.16.04.1, 0.100.3+dfsg-0ubuntu0.16.04.1), clamav-freshclam:amd64 (0.100.2+dfsg-1ubuntu0.16.04.1, 0.100.3+dfsg-0ubuntu0.16.04.1), libpolkit-backend-1-0:amd64 (0.105-14.1ubuntu0.1, 0.105-14.1ubuntu0.5), openssh-server:amd64 (1:7.2p2-4ubuntu2.6, 1:7.2p2-4ubuntu2.8), iproute2:amd64 (4.3.0-1ubuntu3.16.04.3, 4.3.0-1ubuntu3.16.04.5), php7.0-intl:amd64 (7.0.32-0ubuntu0.16.04.1, 7.0.33-0ubuntu0.16.04.4), libgdk-pixbuf2.0-common:amd64 (2.32.2-1ubuntu1.5, 2.32.2-1ubuntu1.6), openssh-client:amd64 (1:7.2p2-4ubuntu2.6, 1:7.2p2-4ubuntu2.8), python3-certbot-apache:amd64 (0.25.0-2+ubuntu16.04.1+certbot+1, 0.31.0-1+ubuntu16.04.1+certbot+1), libmysqlclient20:amd64 (5.7.24-0ubuntu0.16.04.1, 5.7.26-0ubuntu0.16.04.1), libgs9-common:amd64 (9.25~dfsg+1-0ubuntu0.16.04.2, 9.26~dfsg+0-0ubuntu0.16.04.8), keyboard-configuration:amd64 (1.108ubuntu15.4, 1.108ubuntu15.5), bind9:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11, 1:9.10.3.dfsg.P4-8ubuntu1.14), libdns162:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11, 1:9.10.3.dfsg.P4-8ubuntu1.14), policykit-1:amd64 (0.105-14.1ubuntu0.1, 0.105-14.1ubuntu0.5), python3-certbot:amd64 (0.26.1-1+ubuntu16.04.1+certbot+2, 0.31.0-1+ubuntu16.04.1+certbot+1), file:amd64 (1:5.25-2ubuntu1.1, 1:5.25-2ubuntu1.2), pciutils:amd64 (1:3.3.1-1.1ubuntu1.2, 1:3.3.1-1.1ubuntu1.3), libqt5webenginecore5:amd64 (5.6.4-1~xenial4, 5.6.4-1~xenial6), unattended-upgrades:amd64 (0.90ubuntu0.9, 0.90ubuntu0.10), libnss3:amd64 (2:3.28.4-0ubuntu0.16.04.3, 2:3.28.4-0ubuntu0.16.04.5), libisccc140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11, 1:9.10.3.dfsg.P4-8ubuntu1.14), clamav-base:amd64 (0.100.2+dfsg-1ubuntu0.16.04.1, 0.100.3+dfsg-0ubuntu0.16.04.1), wget:amd64 (1.17.1-1ubuntu1.4, 1.17.1-1ubuntu1.5), php7.0-soap:amd64 (7.0.32-0ubuntu0.16.04.1, 7.0.33-0ubuntu0.16.04.4), linux-firmware:amd64 (1.157.20, 1.157.21), python-certbot-apache:amd64 (0.25.0-2+ubuntu16.04.1+certbot+1, 0.31.0-1+ubuntu16.04.1+certbot+1), libclamav7:amd64 (0.100.2+dfsg-1ubuntu0.16.04.1, 0.100.3+dfsg-0ubuntu0.16.04.1), apache2-doc:amd64 (2.4.18-2ubuntu3.9, 2.4.18-2ubuntu3.10), libbind9-140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11, 1:9.10.3.dfsg.P4-8ubuntu1.14), libpci3:amd64 (1:3.3.1-1.1ubuntu1.2, 1:3.3.1-1.1ubuntu1.3), nextcloud-client-l10n:amd64 (2.5.0-20181111.015125~xenial1, 2.5.2-20190319.015224~xenial1), libcupsimage2:amd64 (2.1.3-4ubuntu0.5, 2.1.3-4ubuntu0.6), libavahi-client3:amd64 (0.6.32~rc+dfsg-1ubuntu2.2, 0.6.32~rc+dfsg-1ubuntu2.3), curl:amd64 (7.47.0-1ubuntu2.11, 7.47.0-1ubuntu2.12), linux-generic:amd64 (4.4.0.139.145, 4.4.0.145.153), libapache2-mod-php7.0:amd64 (7.0.32-0ubuntu0.16.04.1, 7.0.33-0ubuntu0.16.04.4), libcurl3-gnutls:amd64 (7.47.0-1ubuntu2.11, 7.47.0-1ubuntu2.12), libxslt1.1:amd64 (1.1.28-2.1ubuntu0.1, 1.1.28-2.1ubuntu0.2), php7.0-mysql:amd64 (7.0.32-0ubuntu0.16.04.1, 7.0.33-0ubuntu0.16.04.4), tzdata:amd64 (2018g-0ubuntu0.16.04, 2019a-0ubuntu0.16.04), software-properties-common:amd64 (0.96.20.7, 0.96.20.8)
Downgrade: libmpx0:amd64 (5.4.0-6ubuntu1~16.04.11, 5.4.0-6ubuntu1~16.04.10), libgcc-5-dev:amd64 (5.4.0-6ubuntu1~16.04.11, 5.4.0-6ubuntu1~16.04.10), dbus-x11:amd64 (1.10.6-1ubuntu3.3, 1.10.6-1ubuntu3.1), libdbus-1-3:amd64 (1.10.6-1ubuntu3.3, 1.10.6-1ubuntu3.1), libapt-inst2.0:amd64 (1.2.31, 1.2.29ubuntu0.1), libldap-2.4-2:amd64 (2.4.42+dfsg-2ubuntu3.5, 2.4.42+dfsg-2ubuntu3.2), apt:amd64 (1.2.31, 1.2.29ubuntu0.1), cpp-5:amd64 (5.4.0-6ubuntu1~16.04.11, 5.4.0-6ubuntu1~16.04.10), dbus:amd64 (1.10.6-1ubuntu3.3, 1.10.6-1ubuntu3.1), libkmod2:amd64 (22-1ubuntu5.2, 22-1ubuntu5), libitm1:amd64 (5.4.0-6ubuntu1~16.04.11, 5.4.0-6ubuntu1~16.04.10), sudo:amd64 (1.8.16-0ubuntu1.5, 1.8.16-0ubuntu1.4), libc6:amd64 (2.26-0ubuntu2.1, 2.23-0ubuntu10), libcilkrts5:amd64 (5.4.0-6ubuntu1~16.04.11, 5.4.0-6ubuntu1~16.04.10), passwd:amd64 (1:4.2-3.1ubuntu5.4, 1:4.2-3.1ubuntu5.3), libasan2:amd64 (5.4.0-6ubuntu1~16.04.11, 5.4.0-6ubuntu1~16.04.10), libquadmath0:amd64 (5.4.0-6ubuntu1~16.04.11, 5.4.0-6ubuntu1~16.04.10), isc-dhcp-common:amd64 (4.3.3-5ubuntu12.10, 4.3.3-5ubuntu12.9), amd64-microcode:amd64 (3.20180524.1~ubuntu0.16.04.2, 3.20180524.1~ubuntu0.16.04.1), libapt-pkg5.0:amd64 (1.2.31, 1.2.29ubuntu0.1), kmod:amd64 (22-1ubuntu5.2, 22-1ubuntu5), gcc-5-base:amd64 (5.4.0-6ubuntu1~16.04.11, 5.4.0-6ubuntu1~16.04.10), libtsan0:amd64 (5.4.0-6ubuntu1~16.04.11, 5.4.0-6ubuntu1~16.04.10), libubsan0:amd64 (5.4.0-6ubuntu1~16.04.11, 5.4.0-6ubuntu1~16.04.10), gcc-5:amd64 (5.4.0-6ubuntu1~16.04.11, 5.4.0-6ubuntu1~16.04.10), liblsan0:amd64 (5.4.0-6ubuntu1~16.04.11, 5.4.0-6ubuntu1~16.04.10), libgomp1:amd64 (5.4.0-6ubuntu1~16.04.11, 5.4.0-6ubuntu1~16.04.10), login:amd64 (1:4.2-3.1ubuntu5.4, 1:4.2-3.1ubuntu5.3), apt-utils:amd64 (1.2.31, 1.2.29ubuntu0.1), libgnutls30:amd64 (3.5.8-6ubuntu3, 3.4.10-4ubuntu1.3), libatomic1:amd64 (5.4.0-6ubuntu1~16.04.11, 5.4.0-6ubuntu1~16.04.10), libtasn1-6:amd64 (4.12-2.1ubuntu0.1, 4.7-3ubuntu0.16.04.3), libcc1-0:amd64 (5.4.0-6ubuntu1~16.04.11, 5.4.0-6ubuntu1~16.04.10), libstdc++6:amd64 (5.4.0-6ubuntu1~16.04.11, 5.4.0-6ubuntu1~16.04.10), isc-dhcp-client:amd64 (4.3.3-5ubuntu12.10, 4.3.3-5ubuntu12.9), awstats:amd64 (7.4+dfsg-1ubuntu0.3, 7.4+dfsg-1ubuntu0.2)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2019-05-01 16:38:53
Start-Date: 2019-05-01 16:39:14
Commandline: apt-get -f install
Requested-By: willy (1000)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2019-05-01 16:39:21
Start-Date: 2019-05-01 16:39:53
Commandline: apt-get install libc6-i386
Requested-By: willy (1000)
Install: libc6-i386:amd64 (2.23-0ubuntu10)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2019-05-01 16:39:53
Start-Date: 2019-05-01 16:50:13
Commandline: apt-get install aria2
Requested-By: willy (1000)
Install: libssh2-1:amd64 (1.5.0-2ubuntu0.1, automatic), aria2:amd64 (1.19.0-1build1)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2019-05-01 16:50:13
Start-Date: 2019-05-01 16:55:15
Commandline: apt-get install locales
Requested-By: willy (1000)
Install: locales:amd64 (2.23-0ubuntu10), libc-bin:amd64 (2.23-0ubuntu10, automatic)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2019-05-01 16:55:15
Start-Date: 2019-05-01 16:55:54
Commandline: apt install locales
Requested-By: willy (1000)
Install: locales:amd64 (2.23-0ubuntu10), libc-bin:amd64 (2.23-0ubuntu10, automatic)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2019-05-01 16:55:54
运行时: grep -Ev '^#|^\s*$' /etc/apt/sources.list{,.d/*.list}
我得到这个:
/etc/apt/sources.list:deb http://asi-fs-n.contabo.net/ubuntu xenial main restricted
/etc/apt/sources.list:deb http://asi-fs-n.contabo.net/ubuntu xenial-updates main restricted
/etc/apt/sources.list:deb http://asi-fs-n.contabo.net/ubuntu xenial universe
/etc/apt/sources.list:deb http://asi-fs-n.contabo.net/ubuntu xenial-updates universe
/etc/apt/sources.list:deb http://asi-fs-n.contabo.net/ubuntu xenial multiverse
/etc/apt/sources.list:deb http://asi-fs-n.contabo.net/ubuntu xenial-updates multiverse
/etc/apt/sources.list:deb http://asi-fs-n.contabo.net/ubuntu xenial-backports main restricted universe multiverse
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security universe
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security multiverse
/etc/apt/sources.list.d/certbot-ubuntu-certbot-xenial.list:deb http://ppa.launchpad.net/certbot/certbot/ubuntu xenial main
/etc/apt/sources.list.d/nextcloud-devs-ubuntu-client-xenial.list:deb http://ppa.launchpad.net/nextcloud-devs/client/ubuntu xenial main
答案1
总结一下我们在评论中详细阐述的修复方法:
您的系统崩溃了,因为您安装了不兼容版本的libc6
,而这是一个非常重要的库,您的一半系统都依赖于它,其中许多软件包甚至需要精确指定的版本。在尝试修复冲突时,您卸载了许多更重要的软件包。
首先你需要libc6
再次下载正确的版本,即从这里可得对于 Ubuntu 16.04(直接下载libc6
amd64 当前版本)。
另一个被删除的重要软件包,以及你apt
在错误消息中看到的抱怨(“getent”和“ldconfig”丢失)是libc-bin
提供这些必需命令的软件包。你会发现它这里再次为 16.04 (直接下载libc-bin
amd64 当前版本)。
使用以下方法手动安装/降级
sudo dpkg -i FILENAME.deb
然后尝试再次安装剩余的重要软件包
sudo apt install ubuntu-minimal
看看还有什么问题。如果成功了,试着让所有东西都井井有条并保持最新状态:
sudo apt update ; sudo apt upgrade
成功运行后,您的系统应该再次处于正常运行和一致的状态。
为将来:永远不要弄乱必要的系统包,当包管理器试图删除重要的东西时不要盲目确认!