更新基于gcc-4.9的软件包(和类似软件包)时的依赖性问题


7

我通常自己检查更新,以确保我拥有最新的一切。今天当我再次去检查更新时,列表中什么都没有!所以我Install Now还是点击。软件更新程序给我以下错误:

包依赖关系无法解决。
可能由于缺少或无法安装的必需附加软件包而导致此错误。此外,不允许同时安装的软件包之间可能存在冲突。

我在Ubuntu面板上也有一个红色图标,显示以​​下消息:

发生错误,请从右键菜单中运行Package Manager或在终端中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-daemonslibstdc++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中


运行命令sudo apt-get install -f,然后按n。将输出添加到游览问题。
AB

@AB运行命令,但是我不需要按n。无论我做错了,或有许多未解决的依赖!

运行sudo apt-get install --reinstall gvfs-daemons libstdc++6并将输出添加到您的问题。
2015年

我看不到问题= \
AB

Answers:


2

如您在的输出中看到的apt-cache policy gvfs-daemons x11-utils libstdc++6 gcc-4.9-base,其安装候选对象gcc-4.9-base4.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

是的,没关系。
AB

不起作用 我按照您输入的顺序尝试了每个命令。第一个完全不起作用,第二个没有降级,但是第三个告诉我它已经是最新版本。

这就是我要处理的。我已经自动删除了一些软件包,但是它希望我删除更多软件包。啊!

我从这里apt-cache policy gvfs-daemons x11-utils libstdc++6 gcc-4.9-base的pastebin 命令中获得了更多新信息。

@BorWal,sudo apt-get install libstdc++6=4.8.4-2ubuntu1~14.04如我从您的新输出中看到的那样,4.9.2-0ubuntu1~14.04从已删除的ppa中仍然返回。然后重试
user.dz '16
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.