1.按照官网的流程输入命令https://qgis.org/en/site/forusers/alldownloads.html#debian-ubuntu

出现

 1 (base) server123@ubuntu:~$ sudo apt-get install qgis
 2 Reading package lists... Done
 3 Building dependency tree       
 4 Reading state information... Done
 5 Some packages could not be installed. This may mean that you have
 6 requested an impossible situation or if you are using the unstable
 7 distribution that some required packages have not yet been created
 8 or been moved out of Incoming.
 9 The following information may help to resolve the situation:
10 
11 The following packages have unmet dependencies:
12  qgis : Depends: libgdal20 (>= 1.8.0) but it is not going to be installed
13         Depends: libqgis-3d3.16.3 but it is not going to be installed
14         Depends: libqgis-analysis3.16.3 but it is not going to be installed
15         Depends: libqgis-app3.16.3 but it is not going to be installed
16         Depends: libqgis-core3.16.3 but it is not going to be installed
17         Depends: libqgis-gui3.16.3 but it is not going to be installed
18         Depends: python3-qgis (= 1:3.16.3+28bionic) but it is not going to be installed
19         Depends: qgis-providers (= 1:3.16.3+28bionic) but it is not going to be installed
20         Recommends: qgis-plugin-grass but it is not going to be installed
21 E: Unable to correct problems, you have held broken packages.

 

2.在网上试了很多办法都不行,崩溃

 

3.看到https://qastack.cn/gis/217727/broken-packages-and-unmet-dependency-installation-qgis-postgresql-and-postgis-u

使用

1 sudo aptitude install qgis python-qgis qgis-plugin-grass

先选no,再选yes,成功!

posted on 2021-04-09 11:09  zmbreathing  阅读(968)  评论(0编辑  收藏  举报