我在these tutorial之后在ubuntu16.04上安装了QGIS2.18。
当我启动它时,一条升级的消息出现在我面前。
为了升级到3.0版本,我卸载了QGIS 2.18。为此,我执行了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.任何帮助都将被感谢。谢谢!
发布于 2020-08-06 01:36:44
我知道已经两年多了,但我会把它对我有用的东西贴出来,以防其他人发现这个问题。看起来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,但要小心它不能神奇地解决问题,你必须注意并选择正确的道路。
https://stackoverflow.com/questions/49778999
复制相似问题