我通常会自己检查更新,以确保我拥有最新的一切。当我今天再次检查更新时,列表中没有任何内容!所以我Install Now还是点击了。软件更新程序给了我以下错误:
无法解析软件包依赖关系。
此错误可能是由于缺少或无法安装所需的附加软件包而导致的。此外,还可能是不允许同时安装的软件包之间存在冲突。
我的 Ubuntu 面板上还出现了一个红色图标,显示以下消息:
发生错误,请从右键菜单运行软件包管理器或在终端中运行 apt-get 来查看错误所在。错误消息为:“错误:标记升级(E:Error,pkgProblemResolver::Resolve 生成中断,这可能是由暂停的软件包引起的。”)。这通常意味着您安装的软件包具有未满足的依赖关系。
。所以我打开了 Synaptic,然后单击了Mark All Upgrades。它要删除至少一百个不同的软件包(其中很多对于 Ubuntu 的运行至关重要!),以便只安装少数几个!当我无论如何标记它们时,我得到了:
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
W: Ignoring file 'getdeb.list.bck' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
W: Ignoring file 'getdeb.list.bck' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
我决定点击Edit > Fix Broken Packages
,但这样做之后我得到:
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
软件包gvfs-daemons
和libstdc++6
被标记为损坏,但我不想为了解决依赖关系而删除那么多软件包。我该怎么办?!?
输出sudo apt-get install -f
:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
N: Ignoring file 'getdeb.list.bck' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'getdeb.list.bck' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
输出sudo apt-get install --reinstall gvfs-daemons libstdc++6
:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 3 reinstalled, 0 to remove and 10 not upgraded.
Need to get 660 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu/ trusty-updates/main gvfs-daemons amd64 1.20.3-0ubuntu1.2 [108 kB]
Get:2 http://ppa.launchpad.net/dolphin-emu/gcc-for-dolphin/ubuntu/ trusty/main libstdc++6 amd64 4.9.2-0ubuntu1~14.04 [269 kB]
Get:3 http://ppa.launchpad.net/dolphin-emu/gcc-for-dolphin/ubuntu/ trusty/main libstdc++6 i386 4.9.2-0ubuntu1~14.04 [283 kB]
Fetched 660 kB in 10s (60.1 kB/s)
(Reading database ... 1325331 files and directories currently installed.)
Preparing to unpack .../libstdc++6_4.9.2-0ubuntu1~14.04_amd64.deb ...
Unpacking libstdc++6:amd64 (4.9.2-0ubuntu1~14.04) over (4.9.2-0ubuntu1~14.04) ...
Preparing to unpack .../libstdc++6_4.9.2-0ubuntu1~14.04_i386.deb ...
Unpacking libstdc++6:i386 (4.9.2-0ubuntu1~14.04) over (4.9.2-0ubuntu1~14.04) ...
Setting up libstdc++6:amd64 (4.9.2-0ubuntu1~14.04) ...
Setting up libstdc++6:i386 (4.9.2-0ubuntu1~14.04) ...
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
(Reading database ... 1325331 files and directories currently installed.)
Preparing to unpack .../gvfs-daemons_1.20.3-0ubuntu1.2_amd64.deb ...
Unpacking gvfs-daemons (1.20.3-0ubuntu1.2) over (1.20.3-0ubuntu1.2) ...
Setting up gvfs-daemons (1.20.3-0ubuntu1.2) ...
N: Ignoring file 'getdeb.list.bck' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'getdeb.list.bck' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
输出apt-cache policy gvfs-daemons x11-utils libstdc++6 gcc-4.9-base
:
gvfs-daemons:
Installed: 1.20.3-0ubuntu1.2
Candidate: 1.20.3-0ubuntu1.2
Version table:
*** 1.20.3-0ubuntu1.2 0
500 archive.ubuntu.com/ubuntu trusty-updates/main amd64 Packages
100 /var/lib/dpkg/status
1.20.1-1ubuntu1 0
500 archive.ubuntu.com/ubuntu trusty/main amd64 Packages
x11-utils:
Installed: 7.7+1
Candidate: 7.7+1
Version table:
*** 7.7+1 0
500 archive.ubuntu.com/ubuntu trusty/main amd64 Packages
100 /var/lib/dpkg/status
libstdc++6:
Installed: 4.9.2-0ubuntu1~14.04
Candidate: 4.9.2-0ubuntu1~14.04
Version table:
*** 4.9.2-0ubuntu1~14.04 0
500 ppa.launchpad.net/dolphin-emu/… trusty/main amd64 Packages
100 /var/lib/dpkg/status
4.8.4-2ubuntu1~14.04 0
500 archive.ubuntu.com/ubuntu trusty-updates/main amd64 Packages
4.8.2-19ubuntu1 0
500 archive.ubuntu.com/ubuntu trusty/main amd64 Packages
gcc-4.9-base:
Installed: 4.9.2-0ubuntu1~14.04
Candidate: 4.9.3-0ubuntu4
Version table:
4.9.3-0ubuntu4 0
500 archive.ubuntu.com/ubuntu trusty-proposed/main amd64 Packages
*** 4.9.2-0ubuntu1~14.04 0
500 ppa.launchpad.net/dolphin-emu/… trusty/main amd64 Packages
100 /var/lib/dpkg/status
4.9.1-0ubuntu1 0
500 archive.ubuntu.com/ubuntu trusty-updates/main amd64 Packages
4.9-20140406-0ubuntu1 0
500 archive.ubuntu.com/ubuntu trusty/main amd64 Packages
N: Ignoring file 'getdeb.list.bck' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'getdeb.list.bck' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
更新:问题又出现了。正如之前所建议的,trusty-proposed
源仍然未选中,但现在主频道 ( trusty-updates
) 中出现了同样的问题。我需要解决依赖关系,否则我将无法轻松更新所有内容。我已将信息存储在Ubuntu Pastebin。
答案1
正如您在输出中看到的apt-cache policy gvfs-daemons x11-utils libstdc++6 gcc-4.9-base
,的安装候选项gcc-4.9-base
是4.9.3-0ubuntu4
:
gcc-4.9-base:
Installed: 4.9.2-0ubuntu1~14.04
Candidate: 4.9.3-0ubuntu4
Version table:
4.9.3-0ubuntu4 0
500 archive.ubuntu.com/ubuntu trusty-proposed/main amd64 Packages
*** 4.9.2-0ubuntu1~14.04 0
500 ppa.launchpad.net/dolphin-emu/… trusty/main amd64 Packages
100 /var/lib/dpkg/status
4.9.1-0ubuntu1 0
500 archive.ubuntu.com/ubuntu trusty-updates/main amd64 Packages
4.9-20140406-0ubuntu1 0
500 archive.ubuntu.com/ubuntu trusty/main amd64 Packages
此版本可用在trusty-proposed
。
但问题是,libstdc++6
有版本4.9.2-0ubuntu1~14.04
,并且没有要安装的版本的候选项,并且和4.9.3-0ubuntu4
的版本必须完全相同。libstdc++6
gcc-4.9-base
libstdc++6:
Installed: 4.9.2-0ubuntu1~14.04
Candidate: 4.9.2-0ubuntu1~14.04
Version table:
*** 4.9.2-0ubuntu1~14.04 0
500 ppa.launchpad.net/dolphin-emu/… trusty/main amd64 Packages
100 /var/lib/dpkg/status
4.8.4-2ubuntu1~14.04 0
500 archive.ubuntu.com/ubuntu trusty-updates/main amd64 Packages
4.8.2-19ubuntu1 0
500 archive.ubuntu.com/ubuntu trusty/main amd64 Packages
因此,请禁用trusty-proposed
:
sudo sed -i '/trusty-proposed/d' /etc/apt/sources.list
和修复
sudo apt-get update
sudo apt-get install -f
针对您问题中的更新进行更新:
升级
sudo apt-get install gcc-4.9-base=4.9.3-0ubuntu4
降级
sudo apt-get install libstdc++6=4.8.4-2ubuntu1~14.04
安装
sudo apt-get install gcc-4.8-base