由于未满足依赖关系,我无法再安装任何东西

由于未满足依赖关系,我无法再安装任何东西

在插件管理器中找不到插件后,我尝试重新安装 QGIS。现在似乎我无法再安装任何东西了。不知何故我的 gedit 也消失了,我无法再安装它了……当我尝试安装时:

sudo apt-get install qgis python-qgis 

我得到:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
qgis is already the newest version.
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:
 python-qgis : Depends: python-qt4 but it is not going to be installed
               Depends: python-sip but it is not going to be installed
               Depends: python-qgis-common (= 2.0.1-2build2) but it is not going to be installed
               Depends: python-psycopg2 but it is not going to be installed
               Depends: python-qscintilla2 but it is not going to be installed
               Depends: python-pyspatialite but it is not going to be installed
               Depends: python:any (>= 2.7.1-0ubuntu2)
               Depends: sip-api-11.0
E: Unable to correct problems, you have held broken packages.

我尝试了论坛上的大部分建议,但到目前为止都没有用。不幸的是,我也没有使用 Linux 的经验。如果能得到帮助,我将非常高兴!

答案1

我的建议是运行sudo apt-get -f install。它应该会遍历依赖关系树并安装任何缺失或损坏的软件包。如果这不起作用,请尝试通过运行以下命令手动安装软件包: 。如果失败,则系统存在问题。作为最后的手段,我建议通过运行并解决问题来sudo apt-get install python-qt4 python-sip python-qgis-common python-psycopg2 python-qscintilla2 python-pyspatialite python:any sip-api-11.0运行版本升级到 17.04 。sudo do-release-upgrade

相关内容