我想为python安装机翼IDE。当我执行它时,dpkg向我展示了一些没有安装的qt包。我通过安装了其中的几个,但其余的都找不到。现在的问题是,我无法安装-f,安装或删除任何其他软件包。所有这些都包括以下内容:
root@debian32:/home/saman/Downloads# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
libqt4-network : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3) but it is not installed
libqt4-sql : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3) but it is not installed
libqt4-sql-mysql : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3) but it is not installed
libqt4-xml : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3) but it is not installed
libqtcore4-perl : Depends: libqtcore4 (>= 4:4.8) but it is not installed
Depends: libqtgui4 (>= 4:4.8) but it is not installed
libqtdbus4 : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3) but it is not installed
libqtgui4-perl : Depends: libqtcore4 (>= 4:4.8) but it is not installed
Depends: libqtgui4 (>= 4:4.8) but it is not installed
libsmokeqtcore4-3 : Depends: libqtcore4 (>= 4:4.8.0) but it is not installed
libsmokeqtgui4-3 : Depends: libqtcore4 (>= 4:4.7.0~beta1) but it is not installed
Depends: libqtgui4 (>= 4:4.8.5) but it is not installed
libsmokeqtnetwork4-3 : Depends: libqtcore4 (>= 4:4.7.0~beta1) but it is not installed
wingide5 : Depends: libqtcore4 (>= 4.6.2) but it is not installed
Depends: libqtgui4 (>= 4.6.2) but it is not installed
Depends: libqt4-svg (>= 4.6.2) but it is not installed
Depends: libqt4-webkit (>= 4.6.2) but it is not installed
Depends: libqt4-script (>= 4:4.5.3) but it is not installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
这对我来说真的是个大问题,我该怎么解决呢?
# apt-cache policy libqtcore4
libqtcore4:
Installed: (none)
Candidate: 4:4.8.6+git64-g5dc8b2b+dfsg-3
Version table:
4:4.8.6+git64-g5dc8b2b+dfsg-3 0
500 http://ftp.tr.debian.org/debian/ stable/main i386 Packages
100 /var/lib/dpkg/status
# apt-get install libqtcore4
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libqtcore4-perl : Depends: libqtgui4 (>= 4:4.8) but it is not going to be installed
libqtgui4-perl : Depends: libqtgui4 (>= 4:4.8) but it is not going to be installed
libsmokeqtgui4-3 : Depends: libqtgui4 (>= 4:4.8.5) but it is not going to be installed
ninja-ide : Depends: python-pyinotify but it is not going to be installed
Depends: python-qt4 but it is not going to be installed
wingide5 : Depends: libqtgui4 (>= 4.6.2) but it is not going to be installed
Depends: libqt4-svg (>= 4.6.2) but it is not going to be installed
Depends: libqt4-webkit (>= 4.6.2) but it is not going to be installed
Depends: libqt4-script (>= 4:4.5.3) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
root@debian32:/usr/share/eclipse/dropins# apt-get install libqtgui4
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libqt4-network : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3) but it is not going to be installed
libqt4-sql : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3) but it is not going to be installed
libqt4-sql-mysql : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3) but it is not going to be installed
libqt4-xml : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3) but it is not going to be installed
libqtcore4-perl : Depends: libqtcore4 (>= 4:4.8) but it is not going to be installed
libqtdbus4 : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3) but it is not going to be installed
libqtgui4 : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3) but it is not going to be installed
libqtgui4-perl : Depends: libqtcore4 (>= 4:4.8) but it is not going to be installed
libsmokeqtcore4-3 : Depends: libqtcore4 (>= 4:4.8.0) but it is not going to be installed
libsmokeqtgui4-3 : Depends: libqtcore4 (>= 4:4.7.0~beta1) but it is not going to be installed
libsmokeqtnetwork4-3 : Depends: libqtcore4 (>= 4:4.7.0~beta1) but it is not going to be installed
ninja-ide : Depends: python-pyinotify but it is not going to be installed
Depends: python-qt4 but it is not going to be installed
wingide5 : Depends: libqtcore4 (>= 4.6.2) but it is not going to be installed
Depends: libqt4-svg (>= 4.6.2) but it is not going to be installed
Depends: libqt4-webkit (>= 4.6.2) but it is not going to be installed
Depends: libqt4-script (>= 4:4.5.3) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
root@debian32:/usr/share/eclipse/dropins# apt-cache policy libqtgui4
libqtgui4:
Installed: (none)
Candidate: 4:4.8.6+git64-g5dc8b2b+dfsg-3
Version table:
4:4.8.6+git64-g5dc8b2b+dfsg-3 0
500 http://ftp.tr.debian.org/debian/ stable/main i386 Packages
100 /var/lib/dpkg/status
发布于 2015-05-26 00:46:11
看起来,您已经破坏了依赖关系,以至于APT无法解决冲突。您可能需要暂时删除一些软件包或安装不需要的软件包。
它可能有助于暂时禁用非官方软件包的来源。编辑/etc/apt/sources.list
或/etc/apt/sources.list.d/*
,将Wingide和其他非官方包源注释掉(在相应行的开头添加#
)。一定要保留所有官方的Debian来源。然后运行apt-get update
并再次尝试apt-get -f install
。
如果这不起作用,试着删除一些非官方的软件包。如果您从这条路线开始,请记下您已删除但希望重新安装的包。如果您安装了智能,您可以使用它从非官方来源搜索包:
apt-cache policy $(aptitude search -F %p '!~Odebian ~i')
通过智能,您还可以在终端中不带参数地启动它,并使用它的接口尝试交互地解决冲突。如果你在这一点上没有天赋,安装它可能会很痛苦。您可以手动下载包并使用dpkg -i
FILENAME.deb
安装它们,但这需要手动跟踪依赖项。
既然您通过安装wingide进入了这种情况,请尝试删除它。
如果取得了进展,请再次运行apt-get -f install
。
一旦您设法使apt-get -f install
运行并没有报告错误,请重新启用非官方源。尝试使用aptitude
或apt-get
代替Synaptic;如今,apt-get
比智能更擅长解决依赖关系--这比Synaptic更好,不过即使使用Synaptic,您也不应该像以前那样出现系统故障:除非手动运行dpkg
或使用--force
选项,否则这是包管理工具中的一个bug,可能是由非官方包中的异常触发的。
发布于 2015-05-26 03:15:28
在我尝试了许多天资选择和朋友在他们的帖子中建议的方式之后,我发现了一个不可思议的选择:
-f
Try hard to fix the dependencies of broken packages, even if it means ignoring the actions requested on the command line.
This corresponds to the configuration item Aptitude::CmdLine::Fix-Broken.
使用此选项,我只能移除其中一个unment依赖项,这将导致删除所有其他冲突:
# aptitude -fy remove "one of unmet dependency package names"
https://unix.stackexchange.com/questions/205457
复制相似问题