首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Ubuntu 16.04依赖的软件包中安装QGIS 3.0时出错

在Ubuntu 16.04依赖的软件包中安装QGIS 3.0时出错
EN

Stack Overflow用户
提问于 2018-04-11 23:27:18
回答 1查看 606关注 0票数 1

我在these tutorial之后在ubuntu16.04上安装了QGIS2.18。

当我启动它时,一条升级的消息出现在我面前。

为了升级到3.0版本,我卸载了QGIS 2.18。为此,我执行了this link的步骤。

但是,当我在this another site之后尝试安装这些新版本时,我得到了以下错误消息:

代码语言:javascript
复制
lucas@lucas:~$ sudo apt-get install qgis python-qgis qgis-plugin-grass saga
[sudo] password for lucas: 
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:
 python-qgis : Depends: python-qgis-common (= 1:3.0.1+git20180411+dabf1c7+24xenial-ubuntugis) but it is not going to be installed
               Depends: libqgispython3.0.1 but it is not going to be installed
               Depends: libqgis-analysis3.0.1 but it is not going to be installed
               Depends: libqgis-core3.0.1 but it is not going to be installed
               Depends: libqgis-gui3.0.1 but it is not going to be installed
               Depends: libqgis-server3.0.1 but it is not going to be installed
 qgis : Depends: gdal-abi-2-2-2 but it is not installable
        Depends: libgdal20 (>= 1.8.0) but it is not installable
        Depends: libqgis-analysis3.0.1 but it is not going to be installed
        Depends: libqgis-app3.0.1 but it is not going to be installed
        Depends: libqgis-core3.0.1 but it is not going to be installed
        Depends: libqgis-gui3.0.1 but it is not going to be installed
        Depends: qgis-providers (= 1:3.0.1+git20180411+dabf1c7+24xenial-ubuntugis) but it is not going to be installed
 qgis-plugin-grass : Depends: qgis-provider-grass (= 1:3.0.1+git20180411+dabf1c7+24xenial-ubuntugis) but it is not going to be installed
                     Depends: libgdal20 (>= 1.8.0) but it is not installable
                     Depends: libqgis-app3.0.1 but it is not going to be installed
                     Depends: libqgis-core3.0.1 but it is not going to be installed
                     Depends: libqgis-gui3.0.1 but it is not going to be installed
                     Depends: libqgisgrass7-3.0.1 but it is not going to be installed
                     Depends: grass740 but it is not installable
E: Unable to correct problems, you have held broken packages.

任何帮助都将被感谢。谢谢!

EN

回答 1

Stack Overflow用户

发布于 2020-08-06 01:36:44

我知道已经两年多了,但我会把它对我有用的东西贴出来,以防其他人发现这个问题。看起来aptitude能更好地处理依赖关系,所以我运行了:

代码语言:javascript
复制
$ sudo aptitude install qgis

值得注意的是,它给我的第一个选择是:

代码语言:javascript
复制
     Keep the following packages at their current version:
1)     python3-psycopg2 [Not Installed]                   
2)     python3-qgis [Not Installed]                       
3)     qgis [Not Installed]                               
4)     qgis-plugin-grass [Not Installed]                  



Accept this solution? [Y/n/q/?] n

我选择n是因为卸载这些包的解决方案不能解决我的情况,然后它提示:

代码语言:javascript
复制
The following actions will resolve these dependencies:

     Install the following packages:     
1)     python3-psycopg2 [2.8.4-2 (focal)]

就在那时,我选择了y,因为安装该依赖项正是我所需要的解决方案。

我建议尝试使用aptitude,但要小心它不能神奇地解决问题,你必须注意并选择正确的道路。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49778999

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档