QT 4 软件包产生依赖问题

QT 4 软件包产生依赖问题

我正在使用 Ubuntu 12.04。我最近对我的系统进行了升级。现在,当我尝试安装软件包(例如 aptitude)时,我看到以下内容:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
aptitude is already the newest version.
aptitude set to manually installed.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libqt4-dbus : Depends: libqt4-xml (= 4:4.8.1-0ubuntu4) but 4:4.8.1-0ubuntu4.1 is to be installed
           Depends: libqtcore4 (= 4:4.8.1-0ubuntu4) but 4:4.8.1-0ubuntu4.1 is to be installed
           Recommends: qdbus (= 4:4.8.1-0ubuntu4)
           Breaks: libqt4-dbus:i386 (!= 4:4.8.1-0ubuntu4) but 4:4.8.1-0ubuntu4.1 is to be installed
libqt4-dbus:i386 : Breaks: libqt4-dbus (!= 4:4.8.1-0ubuntu4.1) but 4:4.8.1-0ubuntu4 is to be installed
libqt4-network : Depends: libqt4-dbus (= 4:4.8.1-0ubuntu4.1) but 4:4.8.1-0ubuntu4 is to be installed
libqt4-script : Depends: libqt4-dbus (= 4:4.8.1-0ubuntu4.1) but 4:4.8.1-0ubuntu4 is to be installed
qdbus : Depends: libqt4-dbus (= 4:4.8.1-0ubuntu4.1) but 4:4.8.1-0ubuntu4 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

然后我继续运行sudo apt-get install -f以修复依赖关系问题。当我运行它时,我收到了以下内容:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  libqt4-dbus
The following packages will be upgraded:
  libqt4-dbus
1 upgraded, 0 newly installed, 0 to remove and 30 not upgraded.
23 not fully installed or removed.
Need to get 0 B/179 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? Y

dpkg: error processing libqt4-dbus (--configure):
 libqt4-dbus:amd64 4:4.8.1-0ubuntu4 cannot be configured because libqt4-dbus:i386 is in a different version (4:4.8.1-0ubuntu4.1)

dpkg: dependency problems prevent configuration of qdbus:
 qdbus depends on libqt4-dbus (= 4:4.8.1-0ubuntu4.1); however:

  Version of libqt4-dbus on system is 4:4.8.1-0ubuntu4.
dpkg: error processing qdbus (--configure):

 dependency problems - leaving unconfigured
dpkg: error processing libqt4-dbus:i386 (--configure):

 libqt4-dbus:i386 4:4.8.1-0ubuntu4.1 cannot be configured because libqt4-dbus:amd64 is in a different version (4:4.8.1-0ubuntu4)

dpkg: dependency problems prevent configuration of libqt4-network:i386:

 libqt4-network:i386 depends on libqt4-dbus (= 4:4.8.1-0ubuntu4.1); however:

  Package libqt4-dbus:i386 is not configured yet.
dpkg: error processing libqt4-network:i386 (--configure):

 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libqt4-network:
 libqt4-network depends on libqt4-dbus (= 4:4.8.1-0ubuntu4.1); however:

  Version of libqt4-dbus on system is 4:4.8.1-0ubuntu4.
dpkg: error processing libqt4-network (--configure):

 dependencNo apport report written because the error message indicates its a followup error from a previous failure.

No apport report written because the error message indicates its a followup error from a previous failure.

No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
y problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libqt4-script:i386:

 libqt4-script:i386 depends on libqt4-dbus (= 4:4.8.1-0ubuntu4.1); however:
  Package libqt4-dbus:i386 is not configured yet.

dpkg: error processing libqt4-script:i386 (--configure):
 dependency problems - leaving unconfigured

dpkg: dependency problems prevent configuration of libqt4-script:
 libqt4-script depends on libqt4-dbus (= 4:4.8.1-0ubuntu4.1); however:
  Version of libqt4-dbus on system is 4:4.8.1-0ubuntu4.

dpkg: error processing libqt4-script (--configure):
 dependency problems - leaving unconfigured

dpkg: dependency problems prevent configuration of libqt4-xmlpatterns:i386:
 libqt4-xmlpatterns:i386 depends on libqt4-network (= 4:4.8.1-0ubuntu4.1); however:
  Package libqt4-network:i386 is not configured yet.

dpkg: error processing libqt4-xmlpatterns:i386 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libqt4-xmlpatternNo apport report written because MaxReports is reached already

No apport report written because MaxReports is reached already
                            s:
 libqt4-xmlpatterns depends on libqt4-network (= 4:4.8.1-0ubuntu4.1); however:
  Package libqt4-network is not configured yet.

dpkg: error processing libqt4-xmlpatterns (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libqt4-declarative:i386:
 libqt4-declarative:i386 depends on libqt4-network (= 4:4.8.1-0ubuntu4.1); however:

  Package libqt4-network:i386 is not configured yet.
 libqt4-declarative:i386 depends on libqt4-script (= 4:4.8.1-0ubuntu4.1); however:
  Package libqt4-script:i386 is not configured yet.
 libqt4-declarative:i386 depends on libqt4-xmlpatterns (= 4:4.8.1-0ubun
tu4.1); however:
  Package libqt4-xmlpatterns:i386 is not configured yet.
dpkg: error processing libqt4-declarative:i386 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libqt4-declarative:
 libqt4-declarative depends on libqt4-network (= 4:4.8.1-0ubuntu4.1); however:
  Package libqt4-network is No apport report written because MaxReports is reached already
       not configured yet.
 libqt4-declarative depends on libqt4-script (= 4:4.8.1-0ubuntu4.1); however:
  Package libqt4-script is not configured yet.

 libqt4-declarative depends on libqt4-xmlpatterns (= 4:4.8.1-0ubuntu4.1); however:
  Package libqt4-xmlpatterns is not configured yet.

dpkg: error processing libqt4-declarative (--configure):
 dependency problems - leaving unconfigured

dpkg: dependency problems prevent configuration of libqt4-designer:
 libqt4-designer depends on libqt4-script (= 4:4.8.1-0ubuntu4.1); however:
  Package libqt4-script is not configured yet.

dpkg: error processing libqt4-designer (--configure):
 dependency problems - leaving unconfigured

dpkg: dependency problems prevent configuration of libqt4-designer:i386:
 libqt4-designer:i386 depends on libqt4-script (= 4:4.8.1-0ubuntu4.1); however:
  Package libqt4-script:i386 is not configured yet.
dpkg: error processing libqt4-designer:i386 (--configure):

 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libqt4-help:
 libqt4-help depends on libqt4-network (= 4:4.8.1-0ubuntu4.1); however:
  Package libqt4-network is not configured yet.

dpkg: error processing libqt4-help (--configure):
 dependency problems - leaving unconfigured

dpkg: dependency problems prevent configuration of libqt4-qt3support:i386:
 libqt4-qt3support:i386 depends on libqt4-designer (= 4:4.8.1-0ubuntu4.1); however:
  Package libqt4-designer:i386 is not configured yet.

 libqt4-qt3support:i386 depends on libqt4-network (= 4:4.8.1-0ubuntu4.1); however:
  Package libqt4-network:i386 is not configured yet.
dpkg: error processing libqt4-qt3support:i386 (--configure):
 dependency problems - leaving unconfigured

dpkg: dependency problems prevent configuration of libqt4-scripttools:
 libqt4-scripttools depends on libqt4-script (= 4:4.8.1-0ubuntu4.1); however:
  Package libqt4-script is not configured yet.
dpkg: error processing libqt4-scripttools (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libqt4-scripttools:i386:

 libqt4-scripttools:i386 depends on libqt4-script (= 4:4.8.1-0ubuntu4.1); however:
  Package libqt4-script:i386 is not configured yet.

dpkg: error processing libqt4-scripttools:i386 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libqtgui4:i386:
 libqtgui4:i386 depends on libqt4-declarative (= 4:4.8.1-0ubuntu4.1); however:
  Package libqt4-declarative:i386 is not configured yet.

dpkg: error processing libqtgui4:i386 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libqtgui4:
 libqtgui4 depends on libqt4-declarative (= 4:4.8.1-0ubuntu4.1); however:
  Package libqt4-declarative is not configured yet.

dpkg: error processing libqtgui4 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libqt4-opengl:

No apport report written because MaxReports is reached already

 libqt4-opengl depends on libqtgui4 (= 4:4.8.1-0ubuntu4.1); however:
  Package libqtgui4 is not configured yet.

dpkg: error processing libqt4-opengl (--configure):
 dependency problems - leaving unconfigured

dpkg: dependency problems prevent configuration of libqt4-opengl:i386:No apport report written because MaxReports is reached already

 libqt4-opengl:i386 depends on libqtgui4 (= 4:4.8.1-0ubuntu4.1); however:
  Package libqtgui4:i386 is not configured yet.
dpkg: error processing libqt4-opengl:i386 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libqt4-svg:
 libqt4-svg depends on libqtgui4 (= 4:4.8.1-0ubuntu4.1); however:
  Package libqtgui4 is not configured yet.
dpkg: error processing libqt4-svg (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libqt4-svg:i386:No apport report written because MaxReports is reached already

 libqt4-svg:i386 depends on libqtgui4 (= 4:4.8.1-0ubuntu4.1); however:
  Package libqtgui4:i386 is not configured yet.
dpkg: error processing libqt4-svg:i386 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libqt4-dbus
 qdbus
 libqt4-dbus:i386
 libqt4-network:i386
 libqt4-network
 libqt4-script:i386
 libqt4-script
 libqt4-xmlpatterns:i386
 libqt4-xmlpatterns
 libqt4-declarative:i386
 libqt4-declarative
 libqt4-designer
 libqt4-designer:i386
 libqt4-help
 libqt4-qt3support:i386
 libqt4-scripttools
 libqt4-scripttools:i386
 libqtgui4:i386
 libqtgui4
 libqt4-opengl
 libqt4-opengl:i386
 libqt4-svg
 libqt4-svg:i386
E: Sub-process /usr/bin/dpkg returned an error code (1)

运行sudo dpkg --configure -a会产生非常相似的结果。有人知道如何解决这些错误吗?我目前无法安装任何软件包。

答案1

我可以通过删除Ubuntu 桌面包以及 unity-2d 和所有的qt软件包。然后,我重新安装了所有东西。现在,我可以毫无困难地安装软件包了。

答案2

我遇到了类似的问题。我不得不删除许多 QT 包,清除它们,然后执行 dist-upgrade:

dpkg -r --force-all \
 indicator-appmenu \
 libdconf-dbus-1-0 \
 libdconf-qt0 \
 libqt4-dbus \
 libqt4-declarative \
 libqt4-declarative-folderlistmodel \
 libqt4-declarative-gestures \
 libqt4-declarative-particles \
 libqt4-declarative-shaders \
 libqt4-designer \
 libqt4-dev \
 libqt4-opengl-dev \
 libqt4-script \
 libqt4-scripttools \
 libqtbamf1 \
 libqtcore4 \
 libqtdee2 \
 libqtgconf1 \
 libqtgui4 \
 libunity-2d-private0 \
 qt4-dev-tools \
 qt4-doc \
 qt4-qmlviewer \
 qt4-qtconfig \
 ubuntu-desktop \
 unity-2d \
 unity-2d-panel \
 unity-2d-shell \
 unity-2d-spread \
 unixodbc-dev

dpkg --purge \
 indicator-appmenu \
 libdconf-dbus-1-0 \
 libdconf-qt0 \
 libqt4-dbus \
 libqt4-declarative \
 libqt4-declarative-folderlistmodel \
 libqt4-declarative-gestures \
 libqt4-declarative-particles \
 libqt4-declarative-shaders \
 libqt4-designer \
 libqt4-dev \
 libqt4-opengl-dev \
 libqt4-script \
 libqt4-scripttools \
 libqtbamf1 \
 libqtcore4 \
 libqtdee2 \
 libqtgconf1 \
 libqtgui4 \
 libunity-2d-private0 \
 qt4-dev-tools \
 qt4-doc \
 qt4-qmlviewer \
 qt4-qtconfig \
 ubuntu-desktop \
 unity-2d \
 unity-2d-panel \
 unity-2d-shell \
 unity-2d-spread \
 unixodbc-dev

apt-get -f dist-upgrade

相关内容