在 Ubuntu 18.04 更新后我遇到了一些问题,例如,当尝试更新、删除或安装某些软件包时,我遇到:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libdevmapper1.02.1:i386 : Depends: libc6:i386 (>= 2.22) but it is not going to be installed
libfreetype6:i386 : Depends: libc6:i386 (>= 2.11) but it is not going to be installed
libfuse2:i386 : Depends: libc6:i386 (>= 2.17) but it is not going to be installed
libgcc1:i386 : Depends: libc6:i386 (>= 2.2.4) but it is not going to be installed
liblzma5:i386 : Depends: libc6:i386 (>= 2.17) but it is not going to be installed
libpcre3:i386 : Depends: libc6:i386 (>= 2.4) but it is not going to be installed
libpng16-16:i386 : Depends: libc6:i386 (>= 2.11) but it is not going to be installed
libselinux1:i386 : Depends: libc6:i386 (>= 2.8) but it is not going to be installed
libstdc++6:i386 : Depends: libc6:i386 (>= 2.18) but it is not going to be installed
libudev1:i386 : Depends: libc6:i386 (>= 2.25) but it is not going to be installed
zlib1g:i386 : Depends: libc6:i386 (>= 2.4) but it is not going to be installed
E: Unmet dependencies. Try
'apt --fix-broken install' 没有软件包(或指定解决方案)。
如何修复?
我尝试做了几件事:
- apt-fix-broken 安装
- sudo apt-get 安装 -f
- sudo dpkg--configure-a
和其他。但都没什么用。现在我只能使用系统,别无他用。
为了apt-get update
:
Hit:1 http://download.virtualbox.org/virtualbox/debian bionic InRelease
Ign:2 http://ppa.launchpad.net/jelmer/daily/ubuntu bionic InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease
Err:4 http://ppa.launchpad.net/jelmer/daily/ubuntu bionic Release
404 Not Found [IP: 91.189.95.83 80]
Hit:5 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease
Get:6 http://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]
Hit:7 http://archive.canonical.com/ubuntu bionic InRelease
Get:8 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88,7 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74,6 kB]
Hit:10 https://packagecloud.io/AtomEditor/atom/any any InRelease
Reading package lists... Done
W: Skipping acquire of configured file 'contrib/source/Sources' as repository 'http://download.virtualbox.org/virtualbox/debian bionic InRelease' does not seem to provide it (sources.list entry misspelt?)
N: Skipping acquire of configured file 'contrib/binary-i386/Packages' as repository 'http://download.virtualbox.org/virtualbox/debian bionic InRelease' doesn't support architecture 'i386'
E: The repository 'http://ppa.launchpad.net/jelmer/daily/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target Packages (multiverse/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target Packages (multiverse/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target Packages (multiverse/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target Translations (multiverse/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target Translations (multiverse/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target DEP-11 (multiverse/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target DEP-11 (multiverse/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target DEP-11-icons-small (multiverse/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target DEP-11-icons (multiverse/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target CNF (multiverse/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target CNF (multiverse/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target Packages (multiverse/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target Packages (multiverse/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target Packages (multiverse/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target Translations (multiverse/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target Translations (multiverse/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target DEP-11 (multiverse/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target DEP-11 (multiverse/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target DEP-11-icons-small (multiverse/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target DEP-11-icons (multiverse/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target CNF (multiverse/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
W: Target CNF (multiverse/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:52
编辑:
apt-get update
Ign:1 http://ppa.launchpad.net/jelmer/daily/ubuntu bionic InRelease
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]
Err:3 http://ppa.launchpad.net/jelmer/daily/ubuntu bionic Release
404 Not Found [IP: 91.189.95.83 80]
Hit:4 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Get:5 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [516 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88,7 kB]
Get:7 http://security.ubuntu.com/ubuntu bionic-security/main i386 Packages [373 kB]
Get:8 http://security.ubuntu.com/ubuntu bionic-security/main Translation-en [173 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [585 kB]
Get:10 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [26,4 kB]
Get:11 http://security.ubuntu.com/ubuntu bionic-security/main DEP-11 64x64 Icons [37,8 kB]
Get:12 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [7 648 B]
Get:13 http://security.ubuntu.com/ubuntu bionic-security/restricted Translation-en [3 064 B]
Get:14 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [607 kB]
Get:15 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [739 kB]
Get:16 http://security.ubuntu.com/ubuntu bionic-security/universe i386 Packages [591 kB]
Get:17 http://security.ubuntu.com/ubuntu bionic-security/universe Translation-en [202 kB]
Get:18 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [285 kB]
Get:19 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [42,1 kB]
Get:20 http://security.ubuntu.com/ubuntu bionic-security/universe DEP-11 64x64 Icons [116 kB]
Get:21 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [4 904 B]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/multiverse Translation-en [2 396 B]
Get:23 http://us.archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 48x48 Icons [70,9 kB]
Get:24 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2 464 B]
Get:25 http://us.archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 64x64 Icons [140 kB]
Get:26 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe i386 Packages [979 kB]
Get:27 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1 006 kB]
Get:28 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [254 kB]
Get:29 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 48x48 Icons [202 kB]
Get:30 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 64x64 Icons [452 kB]
Get:31 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2 468 B]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/jelmer/daily/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libdevmapper1.02.1:i386 : Depends: libc6:i386 (>= 2.22) but it is not installed
libfreetype6:i386 : Depends: libc6:i386 (>= 2.11) but it is not installed
libfuse2:i386 : Depends: libc6:i386 (>= 2.17) but it is not installed
libgcc1:i386 : Depends: libc6:i386 (>= 2.2.4) but it is not installed
liblzma5:i386 : Depends: libc6:i386 (>= 2.17) but it is not installed
libpcre3:i386 : Depends: libc6:i386 (>= 2.4) but it is not installed
libpng16-16:i386 : Depends: libc6:i386 (>= 2.11) but it is not installed
libselinux1:i386 : Depends: libc6:i386 (>= 2.8) but it is not installed
libstdc++6:i386 : Depends: libc6:i386 (>= 2.18) but it is not installed
libudev1:i386 : Depends: libc6:i386 (>= 2.25) but it is not installed
zlib1g:i386 : Depends: libc6:i386 (>= 2.4) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libc-ares2 libdevmapper1.02.1:i386 libfreetype6:i386 libfuse2:i386 libmaxminddb0 libpng16-16:i386 libsmi2ldbl libwireshark-data libwireshark11 libwiretap8 libwscodecs2 libwsutil9
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libc6:i386
Suggested packages:
glibc-doc:i386 locales:i386
The following NEW packages will be installed:
libc6:i386
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 0 B/2 551 kB of archives.
After this operation, 10,8 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
(Reading database ... 453920 files and directories currently installed.)
Preparing to unpack .../libc6_2.27-3ubuntu1_i386.deb ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing archive /var/cache/apt/archives/libc6_2.27-3ubuntu1_i386.deb (--unpack):
new libc6:i386 package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.27-3ubuntu1_i386.deb
libdvd-pkg: Checking orig.tar integrity...
/usr/src/libdvd-pkg/libdvdcss_1.4.2.orig.tar.bz2: OK
libdvd-pkg: `apt-get check` failed, you may have broken packages. Aborting...
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libc-ares2 libdevmapper1.02.1:i386 libfreetype6:i386 libfuse2:i386 libmaxminddb0 libpng16-16:i386 libsmi2ldbl libwireshark-data libwireshark11 libwiretap8 libwscodecs2 libwsutil9
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libc6:i386
Suggested packages:
glibc-doc:i386 locales:i386
The following NEW packages will be installed:
libc6:i386
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 0 B/2 551 kB of archives.
After this operation, 10,8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
(Reading database ... 453920 files and directories currently installed.)
Preparing to unpack .../libc6_2.27-3ubuntu1_i386.deb ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing archive /var/cache/apt/archives/libc6_2.27-3ubuntu1_i386.deb (--unpack):
new libc6:i386 package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.27-3ubuntu1_i386.deb
libdvd-pkg: Checking orig.tar integrity...
/usr/src/libdvd-pkg/libdvdcss_1.4.2.orig.tar.bz2: OK
libdvd-pkg: `apt-get check` failed, you may have broken packages. Aborting...
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo dpkg --configure -a
Processing triggers for libc-bin (2.27-3ubuntu1) ...