LibQt4-core 有未满足的依赖关系

LibQt4-core 有未满足的依赖关系

我正在尝试安装 libqt4-core,但似乎对于依赖项,我有比与此包兼容的版本更新的版本。当我使用时,sudo apt-get install libqt4-core我的输出如下:

user@computer:~/torch$ sudo apt-get install libqt4-core
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:
 libqt4-core : Depends: libqt4-dbus (= 4:4.8.5+git192-g085f851+dfsg-2ubuntu4) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1 is to be installed
               Depends: libqt4-network (= 4:4.8.5+git192-g085f851+dfsg-2ubuntu4) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1 is to be installed
               Depends: libqt4-script (= 4:4.8.5+git192-g085f851+dfsg-2ubuntu4) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1 is to be installed
               Depends: libqt4-test (= 4:4.8.5+git192-g085f851+dfsg-2ubuntu4) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1 is to be installed
               Depends: libqt4-xml (= 4:4.8.5+git192-g085f851+dfsg-2ubuntu4) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1 is to be installed
               Depends: libqtcore4 (= 4:4.8.5+git192-g085f851+dfsg-2ubuntu4) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1 is to be installed
E: Unable to correct problems, you have held broken packages.

我尝试sudo apt-get install libqt4-core=4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1这样做,希望这与我已经安装的软件包兼容,但 apt 说它没有找到这个版本。

我还尝试卸载依赖项并使用旧版本重新安装它们,但依赖项反过来又有更多依赖项,这些依赖项会相互冲突,因为它们也有较新的版本号。我认为一直这样做不是一个好主意,所以我停了下来。如果有一个选项可以强制将所有内容降级到 Debian 版本 2ubuntu4 而不是 2ubuntu4.1,那么似乎应该可以解决这个问题。

我如何安装它?

(从 SO 交叉发布,因为我意识到这是一个发布此问题的更好的地方)

编辑:

uname -a ; lsb_release -rc ; apt-cache showpkg libqt4-core现在包含的信息的输出:

Linux user-asus 3.13.0-68-generic #111-Ubuntu SMP Fri Nov 6 18:17:06 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Release:    14.04
Codename:   trusty

Package: libqt4-core
Versions: 
4:4.8.5+git192-g085f851+dfsg-2ubuntu4 (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_universe_binary-amd64_Packages)
 Description Language: 
                 File: /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_universe_binary-amd64_Packages
                  MD5: f8482ce645d26d9ce978ee864c190ae7
 Description Language: en
                 File: /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_universe_i18n_Translation-en
                  MD5: f8482ce645d26d9ce978ee864c190ae7


Reverse Depends: 
  debathena-thirdparty-libraries,libqt4-core
  debathena-thirdparty,libqt4-core
  libqt4-core:i386,libqt4-core
  chessx,libqt4-core
Dependencies: 
4:4.8.5+git192-g085f851+dfsg-2ubuntu4 - libqt4-dbus (5 4:4.8.5+git192-g085f851+dfsg-2ubuntu4) libqt4-network (5 4:4.8.5+git192-g085f851+dfsg-2ubuntu4) libqt4-script (5 4:4.8.5+git192-g085f851+dfsg-2ubuntu4) libqt4-test (5 4:4.8.5+git192-g085f851+dfsg-2ubuntu4) libqt4-xml (5 4:4.8.5+git192-g085f851+dfsg-2ubuntu4) libqtcore4 (5 4:4.8.5+git192-g085f851+dfsg-2ubuntu4) libqt4-core:i386 (0 (null)) 
Provides: 
4:4.8.5+git192-g085f851+dfsg-2ubuntu4 - 
Reverse Provides: 

编辑2:

更多附加信息

sudo aptitude install libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus

No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

sudo aptitude install libqt4-core

The following NEW packages will be installed:
  libqt4-core{b} 
0 packages upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
Need to get 6,354 B of archives. After unpacking 133 kB will be used.
The following packages have unmet dependencies:
 libqt4-core : Depends: libqt4-dbus (= 4:4.8.5+git192-g085f851+dfsg-2ubuntu4) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1 is installed.
               Depends: libqt4-network (= 4:4.8.5+git192-g085f851+dfsg-2ubuntu4) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1 is installed.
               Depends: libqt4-script (= 4:4.8.5+git192-g085f851+dfsg-2ubuntu4) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1 is installed.
               Depends: libqt4-test (= 4:4.8.5+git192-g085f851+dfsg-2ubuntu4) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1 is installed.
               Depends: libqt4-xml (= 4:4.8.5+git192-g085f851+dfsg-2ubuntu4) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1 is installed.
               Depends: libqtcore4 (= 4:4.8.5+git192-g085f851+dfsg-2ubuntu4) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1 is installed.
The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     libqt4-core [Not Installed]                        

Accept this solution? [Y/n/q/?] q
Abandoning all efforts to resolve these dependencies.
Abort.

编辑3:

输出apt-cache policy libqt4-core libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus

答案1

  1. 前往“设置”→“软件和更新”
  2. 在 Ubuntu 软件选项卡上:启用universe组件
  3. 在“更新”选项卡上:启用trusty-security&trusty-updates
  4. 关闭并重新加载
  5. sudo apt-get install libqt4-core

apt-cache policy正如您从输出中看到的:

libqt4-core:
  Installed: (none)
  Candidate: 4:4.8.5+git192-g085f851+dfsg-2ubuntu4
  Version table:
     4:4.8.5+git192-g085f851+dfsg-2ubuntu4 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
libqtcore4:
  Installed: 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1
  Candidate: 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1
  Version table:
 *** 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
        100 /var/lib/dpkg/status
     4:4.8.5+git192-g085f851+dfsg-2ubuntu4 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
  • 这应该被报告为一个错误。libqt4-core 被上传为universe,但其所有依赖项都被上传为main。所有这些包都来自同一个源包,它们应该被上传到同一个组件下。请参阅http://packages.ubuntu.com/source/trusty/qt4-x11
  • 您已trusty-updates启用main但尚未启用universe

所有依赖项均安装自 的版本4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1trusty-update/main相应版本的 libqt4-core 位于trusty-update/universe

您可以尝试禁用universe并关闭窗口而不重新加载,然后再次打开并启用它们。或者通过编辑手动启用trusty-security它们。trusty-updates/etc/apt/sources.list

相关内容