在Ubuntu 16.04上安装QGIS 3.0时出错 - 从属软件包

时间:2018-04-11 15:27:18

标签: ubuntu qgis

我在these tutorial之后在ubuntu 16.04安装了QGIS 2.18。

当我启动它时,我会看到升级消息。

我卸载了QGIS 2.18以升级到3.0版。为此,我执行了this link

的步骤

但是,当我尝试按照this another site安装这些新版本时,我收到以下错误消息:

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.

任何帮助都会被贬低。 谢谢!

1 个答案:

答案 0 :(得分:0)

我知道已经超过2年了,但是如果有人发现此问题,我会贴出对我有用的内容。 看起来aptitude处理依赖性更好,所以我跑了:

$ sudo aptitude install qgis

重要的是,它给我的第一个选择是:

     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是因为使那些软件包保持卸载状态并不能解决我的情况,于是提示:

The following actions will resolve these dependencies:

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

那是我打y的时候,因为安装该依赖项是我需要的解决方案。
我建议尝试使用aptitude,但请注意,它不能神奇地解决问题,因此您必须注意并选择正确的方法。