我使用 apt-get 安装了几乎所有我需要的应用程序,但是在安装了新版本 Ubuntu(16.04)后,我不再能够使用该命令。每次我使用它时,它都会告诉我正在安装的软件包有未满足的依赖关系,当我尝试安装 Java、LibreOffice、flash 甚至 aptitude 时都会发生这种情况。
例如,这是我尝试安装 LibreOffice 时得到的输出
sudo apt-get install libreoffice
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libreoffice : Depends: libreoffice-base but it is not going to be installed
Depends: libreoffice-calc but it is not going to be installed
Depends: libreoffice-core (= 1:5.1.4-0ubuntu1) but it is not going to be installed
Depends: libreoffice-draw but it is not going to be installed
Depends: libreoffice-impress but it is not going to be installed
Depends: libreoffice-math but it is not going to be installed
Depends: libreoffice-report-builder-bin but it is not going to be installed
Depends: libreoffice-writer but it is not going to be installed
Depends: libreoffice-avmedia-backend-gstreamer but it is not going to be installed
Depends: fonts-dejavu but it is not going to be installed
Depends: python3-uno (>= 4.4.0~beta2) but it is not going to be installed
Recommends: libreoffice-gnome but it is not going to be installed or
libreoffice-kde but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
“dir /etc/apt/sources.list.d”的输出
libreoffice-ubuntu-libreoffice-4-4-xenial.list
openjdk-r-ubuntu-ppa-xenial.list
openjdk-r-ubuntu-ppa-xenial.list.save
webupd8team-ubuntu-java-xenial.list
webupd8team-ubuntu-java-xenial.list.save
cat /etc/apt/sources.list 的输出
# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu xenial restricted multiverse
# deb-src http://ae.archive.ubuntu.com/ubuntu/ xenial main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu xenial-updates restricted multiverse
# deb-src http://ae.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://archive.ubuntu.com/ubuntu xenial universe
# deb-src http://ae.archive.ubuntu.com/ubuntu/ xenial universe
deb http://archive.ubuntu.com/ubuntu xenial-updates universe
# deb-src http://ae.archive.ubuntu.com/ubuntu/ xenial-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
# deb-src http://ae.archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src http://ae.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu xenial-backports restricted universe multiverse
# deb-src http://ae.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://archive.ubuntu.com/ubuntu xenial-security restricted multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://archive.ubuntu.com/ubuntu xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
deb http://security.ubuntu.com/ubuntu lucid-security main multiverse
deb http://ftp.debian.org/debian wheezy-backports main
deb http://ftp.debian.org/debian jessie-backports main
sudo apt-get update 的输出
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Ign:2 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial InRelease
Hit:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Ign:4 http://security.ubuntu.com/ubuntu lucid-security InRelease
Hit:5 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu xenial InRelease
Hit:6 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:7 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease
Ign:8 http://security.ubuntu.com/ubuntu lucid-security Release
Hit:9 http://archive.ubuntu.com/ubuntu xenial-security InRelease
Ign:10 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial Release
Ign:11 http://security.ubuntu.com/ubuntu lucid-security/main amd64 Packages.diff/Index
Ign:12 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main amd64 Packages
Ign:13 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main i386 Packages
Ign:14 http://security.ubuntu.com/ubuntu lucid-security/main i386 Packages.diff/Index
Ign:15 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main all Packages
Ign:16 http://security.ubuntu.com/ubuntu lucid-security/main all Packages
Ign:17 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main Translation-en_US
Ign:18 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main Translation-en
Ign:19 http://security.ubuntu.com/ubuntu lucid-security/main Translation-en_US
Ign:20 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main amd64 DEP-11 Metadata
Ign:21 http://security.ubuntu.com/ubuntu lucid-security/main Translation-en
Ign:22 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main DEP-11 64x64 Icons
Ign:12 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main amd64 Packages
Ign:23 http://security.ubuntu.com/ubuntu lucid-security/main amd64 DEP-11 Metadata
Ign:13 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main i386 Packages
Ign:24 http://security.ubuntu.com/ubuntu lucid-security/main DEP-11 64x64 Icons
Ign:15 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main all Packages
Ign:25 http://security.ubuntu.com/ubuntu lucid-security/multiverse amd64 Packages.diff/Index
Ign:17 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main Translation-en_US
Ign:18 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main Translation-en
Ign:26 http://security.ubuntu.com/ubuntu lucid-security/multiverse i386 Packages.diff/Index
Ign:20 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main amd64 DEP-11 Metadata
Ign:27 http://security.ubuntu.com/ubuntu lucid-security/multiverse all Packages
Ign:22 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main DEP-11 64x64 Icons
Ign:12 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main amd64 Packages
Ign:28 http://security.ubuntu.com/ubuntu lucid-security/multiverse Translation-en_US
Ign:13 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main i386 Packages
Ign:29 http://security.ubuntu.com/ubuntu lucid-security/multiverse Translation-en
Ign:15 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main all Packages
Ign:30 http://security.ubuntu.com/ubuntu lucid-security/multiverse amd64 DEP-11 Metadata
Ign:17 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main Translation-en_US
Ign:31 http://security.ubuntu.com/ubuntu lucid-security/multiverse DEP-11 64x64 Icons
Ign:18 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main Translation-en
Ign:32 http://security.ubuntu.com/ubuntu lucid-security/main amd64 Packages
Ign:20 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main amd64 DEP-11 Metadata
Ign:22 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main DEP-11 64x64 Icons
Ign:33 http://security.ubuntu.com/ubuntu lucid-security/main i386 Packages
Ign:12 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main amd64 Packages
Ign:16 http://security.ubuntu.com/ubuntu lucid-security/main all Packages
Ign:13 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main i386 Packages
Ign:15 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main all Packages
Ign:19 http://security.ubuntu.com/ubuntu lucid-security/main Translation-en_US
Ign:17 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main Translation-en_US
Ign:21 http://security.ubuntu.com/ubuntu lucid-security/main Translation-en
Ign:18 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main Translation-en
Ign:20 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main amd64 DEP-11 Metadata
Ign:23 http://security.ubuntu.com/ubuntu lucid-security/main amd64 DEP-11 Metadata
Ign:22 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main DEP-11 64x64 Icons
Ign:12 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main amd64 Packages
Ign:13 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main i386 Packages
Ign:24 http://security.ubuntu.com/ubuntu lucid-security/main DEP-11 64x64 Icons
Ign:15 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main all Packages
Ign:34 http://security.ubuntu.com/ubuntu lucid-security/multiverse amd64 Packages
Ign:17 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main Translation-en_US
Ign:18 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main Translation-en
Ign:35 http://security.ubuntu.com/ubuntu lucid-security/multiverse i386 Packages
Get:36 http://ftp.debian.org/debian wheezy-backports InRelease [163 kB]
Ign:20 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main amd64 DEP-11 Metadata
Ign:27 http://security.ubuntu.com/ubuntu lucid-security/multiverse all Packages
Ign:22 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main DEP-11 64x64 Icons
Err:12 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main amd64 Packages
404 Not Found
Ign:28 http://security.ubuntu.com/ubuntu lucid-security/multiverse Translation-en_US
Err:13 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main i386 Packages
404 Not Found
Ign:29 http://security.ubuntu.com/ubuntu lucid-security/multiverse Translation-en
Ign:36 http://ftp.debian.org/debian wheezy-backports InRelease
Get:37 http://ftp.debian.org/debian jessie-backports InRelease [166 kB]
Ign:15 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main all Packages
Ign:30 http://security.ubuntu.com/ubuntu lucid-security/multiverse amd64 DEP-11 Metadata
Ign:17 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main Translation-en_US
Ign:31 http://security.ubuntu.com/ubuntu lucid-security/multiverse DEP-11 64x64 Icons
Ign:18 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main Translation-en
Ign:32 http://security.ubuntu.com/ubuntu lucid-security/main amd64 Packages
Ign:37 http://ftp.debian.org/debian jessie-backports InRelease
Ign:20 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main amd64 DEP-11 Metadata
Ign:22 http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial/main DEP-11 64x64 Icons
Ign:33 http://security.ubuntu.com/ubuntu lucid-security/main i386 Packages
Ign:16 http://security.ubuntu.com/ubuntu lucid-security/main all Packages
Ign:19 http://security.ubuntu.com/ubuntu lucid-security/main Translation-en_US
Ign:21 http://security.ubuntu.com/ubuntu lucid-security/main Translation-en
Ign:23 http://security.ubuntu.com/ubuntu lucid-security/main amd64 DEP-11 Metadata
Ign:24 http://security.ubuntu.com/ubuntu lucid-security/main DEP-11 64x64 Icons
Ign:34 http://security.ubuntu.com/ubuntu lucid-security/multiverse amd64 Packages
Ign:35 http://security.ubuntu.com/ubuntu lucid-security/multiverse i386 Packages
Ign:27 http://security.ubuntu.com/ubuntu lucid-security/multiverse all Packages
Ign:28 http://security.ubuntu.com/ubuntu lucid-security/multiverse Translation-en_US
Ign:29 http://security.ubuntu.com/ubuntu lucid-security/multiverse Translation-en
Ign:30 http://security.ubuntu.com/ubuntu lucid-security/multiverse amd64 DEP-11 Metadata
Ign:31 http://security.ubuntu.com/ubuntu lucid-security/multiverse DEP-11 64x64 Icons
Ign:32 http://security.ubuntu.com/ubuntu lucid-security/main amd64 Packages
Ign:33 http://security.ubuntu.com/ubuntu lucid-security/main i386 Packages
Ign:16 http://security.ubuntu.com/ubuntu lucid-security/main all Packages
Ign:19 http://security.ubuntu.com/ubuntu lucid-security/main Translation-en_US
Ign:21 http://security.ubuntu.com/ubuntu lucid-security/main Translation-en
Ign:23 http://security.ubuntu.com/ubuntu lucid-security/main amd64 DEP-11 Metadata
Ign:24 http://security.ubuntu.com/ubuntu lucid-security/main DEP-11 64x64 Icons
Ign:34 http://security.ubuntu.com/ubuntu lucid-security/multiverse amd64 Packages
Ign:35 http://security.ubuntu.com/ubuntu lucid-security/multiverse i386 Packages
Ign:27 http://security.ubuntu.com/ubuntu lucid-security/multiverse all Packages
Ign:28 http://security.ubuntu.com/ubuntu lucid-security/multiverse Translation-en_US
Ign:29 http://security.ubuntu.com/ubuntu lucid-security/multiverse Translation-en
Ign:30 http://security.ubuntu.com/ubuntu lucid-security/multiverse amd64 DEP-11 Metadata
Ign:31 http://security.ubuntu.com/ubuntu lucid-security/multiverse DEP-11 64x64 Icons
Ign:32 http://security.ubuntu.com/ubuntu lucid-security/main amd64 Packages
Ign:33 http://security.ubuntu.com/ubuntu lucid-security/main i386 Packages
Ign:16 http://security.ubuntu.com/ubuntu lucid-security/main all Packages
Ign:19 http://security.ubuntu.com/ubuntu lucid-security/main Translation-en_US
Ign:21 http://security.ubuntu.com/ubuntu lucid-security/main Translation-en
Ign:23 http://security.ubuntu.com/ubuntu lucid-security/main amd64 DEP-11 Metadata
Ign:24 http://security.ubuntu.com/ubuntu lucid-security/main DEP-11 64x64 Icons
Ign:34 http://security.ubuntu.com/ubuntu lucid-security/multiverse amd64 Packages
Ign:35 http://security.ubuntu.com/ubuntu lucid-security/multiverse i386 Packages
Ign:27 http://security.ubuntu.com/ubuntu lucid-security/multiverse all Packages
Ign:28 http://security.ubuntu.com/ubuntu lucid-security/multiverse Translation-en_US
Ign:29 http://security.ubuntu.com/ubuntu lucid-security/multiverse Translation-en
Ign:30 http://security.ubuntu.com/ubuntu lucid-security/multiverse amd64 DEP-11 Metadata
Ign:31 http://security.ubuntu.com/ubuntu lucid-security/multiverse DEP-11 64x64 Icons
Ign:32 http://security.ubuntu.com/ubuntu lucid-security/main amd64 Packages
Ign:33 http://security.ubuntu.com/ubuntu lucid-security/main i386 Packages
Ign:16 http://security.ubuntu.com/ubuntu lucid-security/main all Packages
Ign:19 http://security.ubuntu.com/ubuntu lucid-security/main Translation-en_US
Ign:21 http://security.ubuntu.com/ubuntu lucid-security/main Translation-en
Ign:23 http://security.ubuntu.com/ubuntu lucid-security/main amd64 DEP-11 Metadata
Ign:24 http://security.ubuntu.com/ubuntu lucid-security/main DEP-11 64x64 Icons
Ign:34 http://security.ubuntu.com/ubuntu lucid-security/multiverse amd64 Packages
Ign:35 http://security.ubuntu.com/ubuntu lucid-security/multiverse i386 Packages
Ign:27 http://security.ubuntu.com/ubuntu lucid-security/multiverse all Packages
Ign:28 http://security.ubuntu.com/ubuntu lucid-security/multiverse Translation-en_US
Ign:29 http://security.ubuntu.com/ubuntu lucid-security/multiverse Translation-en
Ign:30 http://security.ubuntu.com/ubuntu lucid-security/multiverse amd64 DEP-11 Metadata
Ign:31 http://security.ubuntu.com/ubuntu lucid-security/multiverse DEP-11 64x64 Icons
Err:32 http://security.ubuntu.com/ubuntu lucid-security/main amd64 Packages
404 Not Found [IP: 91.189.88.161 80]
Err:33 http://security.ubuntu.com/ubuntu lucid-security/main i386 Packages
404 Not Found [IP: 91.189.88.161 80]
Err:34 http://security.ubuntu.com/ubuntu lucid-security/multiverse amd64 Packages
404 Not Found [IP: 91.189.88.161 80]
Err:35 http://security.ubuntu.com/ubuntu lucid-security/multiverse i386 Packages
404 Not Found [IP: 91.189.88.161 80]
Fetched 329 kB in 18s (18.0 kB/s)
Reading package lists... Done
W: The repository 'http://security.ubuntu.com/ubuntu lucid-security Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ftp.debian.org/debian wheezy-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010
W: The repository 'http://ftp.debian.org/debian wheezy-backports InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: There is no public key available for the following key IDs:
8B48AD6246925553 NO_PUBKEY 7638D0442B90D010
W: GPG error: http://ftp.debian.org/debian jessie-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010
W: The repository 'http://ftp.debian.org/debian jessie-backports InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: There is no public key available for the following key IDs:
8B48AD6246925553 NO_PUBKEY 7638D0442B90D010
E: Failed to fetch http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found
E: Failed to fetch http://ppa.launchpad.net/libreoffice/libreoffice-4-4/ubuntu/dists/xenial/main/binary-i386/Packages 404 Not Found
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/lucid-security/main/binary-amd64/Packages 404 Not Found [IP: 91.189.88.161 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/lucid-security/main/binary-i386/Packages 404 Not Found [IP: 91.189.88.161 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/lucid-security/multiverse/binary-amd64/Packages 404 Not Found [IP: 91.189.88.161 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/lucid-security/multiverse/binary-i386/Packages 404 Not Found [IP: 91.189.88.161 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
答案1
您的设置中的一个核心问题是您混合了 Debian 和 Ubuntu 存储库,以及混合了 Lucid 存储库。我不知道您的设置中是如何发生这种情况的,因为在我曾经使用过的任何设置(包括升级设置)上都无法复制这种情况。
以下是一些你必须移除从您的来源。Lucid Security 已经死了,而且已经死了很久了,在 Ubuntu 中包含 Debian 存储库会破坏一切:
deb http://security.ubuntu.com/ubuntu lucid-security main multiverse
deb http://ftp.debian.org/debian wheezy-backports main
deb http://ftp.debian.org/debian jessie-backports main
这三项位于您的文件的底部/etc/apt/sources.list
。
切勿在同一系统上混合使用 Debian 和 Ubuntu 存储库。 曾经。
这是什么严重破坏安装。首先删除我指定的存储库,然后sudo apt-get update; sudo apt-get install -f
再次使用,看看是否仍然出现未满足依赖关系的问题。
答案2
从字面上理解 - “安装新版本 Ubuntu(16.04)后 - 在尝试使用 apt 安装任何东西之前,您必须刷新您的源,即。
sudo apt update
(在 16.04 中,可以使用 apt 而不是 apt-get,它的功能更全面一些