我在Xenial上安装QGIS时遇到问题。

`debian`版本

当我尝试使用debian版本(即没有ubuntugis依赖项)时,出现以下错误(请请注意,没有xenial版本,因此我在设置wily时使用了sources.list):

~$ sudo apt install qgis python-qgis qgis-plugin-grass
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:2.14.1+23wily) but it is not going to be installed
               Depends: libqgispython2.14.1 but it is not going to be installed
               Depends: libqgis-analysis2.14.1 but it is not going to be installed
               Depends: libqgis-core2.14.1 but it is not going to be installed
               Depends: libqgis-gui2.14.1 but it is not going to be installed
               Depends: libqgis-networkanalysis2.14.1 but it is not going to be installed
               Depends: libqgis-server2.14.1 but it is not going to be installed
 qgis : Depends: libgdal.so.1-1.11.2 but it is not installable
        Depends: libgsl0ldbl (>= 1.9) but it is not installable
        Depends: libqgis-analysis2.14.1 but it is not going to be installed
        Depends: libqgis-app2.14.1 but it is not going to be installed
        Depends: libqgis-core2.14.1 but it is not going to be installed
        Depends: libqgis-gui2.14.1 but it is not going to be installed
        Depends: libqgis-networkanalysis2.14.1 but it is not going to be installed
        Depends: qgis-providers (= 1:2.14.1+23wily) but it is not going to be installed
        Recommends: qgis-provider-grass but it is not going to be installed
        Recommends: qgis-plugin-globe but it is not going to be installed
 qgis-plugin-grass : Depends: qgis-provider-grass (= 1:2.14.1+23wily) but it is not going to be installed
                     Depends: libqgis-app2.14.1 but it is not going to be installed
                     Depends: libqgis-core2.14.1 but it is not going to be installed
                     Depends: libqgis-gui2.14.1 but it is not going to be installed
                     Depends: libqgisgrass7-2.14.1 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.


失败后对于debian版本,我尝试通过添加ubuntugis PPA尝试ubuntugis-unstable版本(再次使用ubuntugis的wily版本与QGIS版本保持一致):

:~$ sudo apt update 
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [92.2 kB]
Hit:2 http://gb.archive.ubuntu.com/ubuntu xenial InRelease                                                                                                
Get:3 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu wily InRelease [15.5 kB]                                                                     
Get:4 http://gb.archive.ubuntu.com/ubuntu xenial-updates InRelease [93.3 kB]                                                                                    
Hit:5 http://ppa.launchpad.net/git-core/ppa/ubuntu xenial InRelease                                                                                             
Hit:6 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial InRelease                                                                                   
Hit:7 http://gb.archive.ubuntu.com/ubuntu xenial-backports InRelease                                                        
Get:8 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu wily/main amd64 Packages [4,297 B]                       
Get:9 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu wily/main i386 Packages [4,307 B]                  
Get:10 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu wily/main Translation-en [2,463 B]     
Ign:11 http://linux.dropbox.com/ubuntu wily InRelease                                                  
Hit:12 http://linux.dropbox.com/ubuntu wily Release                      
Ign:14 https://cloud.r-project.org/bin/linux/ubuntu xenial/ InRelease
Hit:15 https://cloud.r-project.org/bin/linux/ubuntu xenial/ Release
Ign:17 http://qgis.org/ubuntugis wily InRelease    
Err:18 http://qgis.org/ubuntugis wily Release
  404  Not Found [IP: 104.27.138.220 80]
Reading package lists... Done
W: https://cloud.r-project.org/bin/linux/ubuntu/xenial/Release.gpg: Signature by key E298A3A825C0D65DFD57CBB651716619E084DAB9 uses weak digest algorithm (SHA1)
E: The repository 'http://qgis.org/ubuntugis wily Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.


E: The repository 'http://qgis.org/ubuntugis wily Release' does not have a Release file.这行看起来很致命,因此我尝试了trusty(最新支持的发行版)。此版本已更新,但是在尝试安装时:

:~$ sudo apt install qgis python-qgis qgis-plugin-grass
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:2.14.1+20trusty-ubuntugis) but it is not going to be installed
               Depends: libqgispython2.14.1 but it is not going to be installed
               Depends: libqgis-analysis2.14.1 but it is not going to be installed
               Depends: libqgis-core2.14.1 but it is not going to be installed
               Depends: libqgis-gui2.14.1 but it is not going to be installed
               Depends: libqgis-networkanalysis2.14.1 but it is not going to be installed
               Depends: libqgis-server2.14.1 but it is not going to be installed
 qgis : Depends: libgdal.so.1-1.11.2
        Depends: libgdal1h (>= 1.8.0) but it is not going to be installed
        Depends: libgeos-c1 (>= 3.4.2) but it is not installable
        Depends: libgsl0ldbl (>= 1.9) but it is not installable
        Depends: libqgis-analysis2.14.1 but it is not going to be installed
        Depends: libqgis-app2.14.1 but it is not going to be installed
        Depends: libqgis-core2.14.1 but it is not going to be installed
        Depends: libqgis-gui2.14.1 but it is not going to be installed
        Depends: libqgis-networkanalysis2.14.1 but it is not going to be installed
        Depends: qgis-providers (= 1:2.14.1+20trusty-ubuntugis) but it is not going to be installed
        Recommends: qgis-provider-grass but it is not going to be installed
        Recommends: qgis-plugin-globe but it is not going to be installed
 qgis-plugin-grass : Depends: qgis-provider-grass (= 1:2.14.1+20trusty-ubuntugis) but it is not going to be installed
                     Depends: libgdal1h (>= 1.8.0) but it is not going to be installed
                     Depends: libqgis-app2.14.1 but it is not going to be installed
                     Depends: libqgis-core2.14.1 but it is not going to be installed
                     Depends: libqgis-gui2.14.1 but it is not going to be installed
                     Depends: libqgisgrass7-2.14.1 but it is not going to be installed
                     Depends: grass-core but it is not going to be installed
E: Unable to correct problems, you have held broken packages.


为了完整起见,最后发布了xenialubuntugis版本:

希望Xenial即将发布QGIS版本,但是有人能在Xenial上安装QGIS 2.14吗?

评论

我从Stackoverflow找到了这个答案来解决问题:stackoverflow.com/a/39770173/5948083

#1 楼

看起来debian存储库中实际上有Xenial支持,尽管我自己还没有尝试以下解决方案,但我认为值得尝试。

在尝试以下操作之前,我将使用sudo apt-get remove qgis python-qgis qgis-plugin-grass卸载所有以前的qgis软件包,并从deb http://qgis.org/debian wily main中删除deb-src http://qgis.org/debian wily main/etc/apt/sources.list

编辑
要删除自动安装的软件包安装qgis时,请在运行上述命令后运行命令sudo apt-get autoremove将其删除。
请编辑


以下内容从qgis.org改编为包含xenial关键字。

将以下内容添加到您的/etc/apt/sources.list中:

deb http://qgis.org/debian xenial main

deb-src http://qgis.org/debian xenial main

然后执行:

sudo apt-get update

sudo apt-get install qgis python-qgis qgis-plugin-grass

如果您能正常使用,我很感兴趣。

评论


我没有尝试过的一种配置!谢谢。

–菲尔
16年4月29日在11:05

很高兴能够提供帮助!

– JonasPedersen
16年4月29日在11:24

这是我使用的解决方案,但是直到我从python的dist-packages文件夹中删除了GDAL 2.1文件夹后,它才起作用。它掩盖了正确的版本,并导致缺少python-gdal错误。现在一切都好。

–Rob Skelly
16年4月30日在6:02

对我而言,下载已开始,但警告未得到验证。我应该很担心吗?

– Abhijit Gujar
16年4月30日在12:18

如果遇到钥匙圈问题,请参阅此页面以获取指示。

– Nxaunxau
16年5月1日下午6:56

#2 楼

如果不确定支持哪些发行版,请在浏览器中输入deb之后的URL,然后导航到dists文件夹。

然后您会看到http://qgis.org/debian/dists/取决于xenial,而http://qgis.org/ubuntugis/dists/仅支持精确可靠。

其他来源是ubuntugis稳定的ppa,目前仅可信赖的QGIS 2.8.3,而ubuntugis不稳定的仍在QGIS 2.8.1。最近在这些ppa上有一些活动,因此请密切注意。

QGIS 2.14.1也可从主要的debian软件包中用于Debian sid,而jessie backports提供2.8.6(与Ubuntu相同)。


UPDATE

ubuntugis不稳定的PPA现在也支持Xenial的QGIS 2.14.1。

#3 楼

作为Linux Mint'Cinnamon'17.3用户,我还为这些“未满足的依赖项(libgdal.so.1-1.11.2等)”而苦苦挣扎,不得不更新ppa。我通过在/etc/apt/sources.list中包含以下链接来做到这一点:

deb http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu trusty main
deb-src http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu trusty main


评论


这也适用于Ubuntu xenial吗?据我所知,该ppa中没有用于xenial的GDAL或QGIS软件包(尚未)。

– AndreJ
16年5月5日在6:07

显然,还没有用于Xenial的GDAL或QGIS软件包。我不知道您可以在多大程度上使用可信任的证书(Linux和QGIS的新增功能)

– andschar
16年5月5日在13:42

对于Linux Mint 17.3,可以使用可信赖的二进制文件。与Mint世界中的ubuntu xenial等效的Linux Mint 18将于2016年6月上市。您可能必须使用QGIS debian软件包。

– AndreJ
16年5月5日在18:31

如果人们想知道这是哪里来的,这是官方的参考资料-trac.osgeo.org/ubuntugis/wiki/UbuntuGISRepository

–chrismarx
18年1月9日在14:58

是的,它确实适用于16.04

–chrismarx
18年9月9日在15:10

#4 楼

要将其安装在xenial中,您只需:

sudo apt-get update
sudo apt-get install qgis


评论


值得一提的是,我发现QGIS 2.16.3在Xubuntu 16.04中不稳定:频繁发生崩溃(程序关闭,没有警告,没有崩溃报告-没什么),通常与包含以下内容的项目的“实时”重新投影有关栅格背景映射。在Kubuntu 14.04中,QGIS 2.16.2的可靠性稍高一些,但并不完美。

–尼克N
16-09-30在8:11

如果不添加额外的PPA,这将无法工作,对吗?

–chrismarx
18年9月9日在15:10

OP明确指出他们已经尝试过了。

–戴夫·埃文斯
18 Mar 15 '18 at 0:57

#5 楼

尽管实施了Internet上的许多技巧,但直到遇到这段简短而有用的视频,我还是无法在Ubuntu 16.04上安装QGIS:https://www.youtube.com/watch?v=hmJwYaYmRDU

直到那时,我还一直在苦苦挣扎有关各种“未满足的依赖项”和“缺少/损坏的程序包”的消息(视频创建者的提示:Linux Enthusiast)

这是您需要遵循的步骤在终端中:

步骤1。
输入:

sudo nano /etc/apt/sources.list [按Enter]

步骤2。
键入:

deb https://qgis.org/ubuntugis-ltr xenial main

deb-src https://qgis.org/ubuntugis-ltr xenial main    

deb http:/ppa.launchpad.net/ubuntugis-unstable/ubuntu/ubuntu xenial main


[按Enter,当系统提示您“保存修改的缓冲区”时,按y键]

步骤3。 br />输入:

wget -O - https://qgis.org/downloads/qgis-2017.gpg.key | gpg --import [按输入]

输入:

gpg --fingerprint CAEB3DC3BDF7FB45 [按输入]

步骤4。
输入:

sudo apt-get update [按Enter]

步骤5。
输入:

sudo apt-get install qgis-server python-qgis [按Enter]

要继续吗? -[按y键]

是否安装这些软件包而不进行验证? [按y键]

然后将安装QGIS,此后您将在程序列表中找到它。祝您好运,希望对您有所帮助。**

#6 楼

Debian Xenial为我工作。首先,我将bleachbit安装到自动删除功能上,干净。

以上内容是谷歌翻译自:

Debian Xenial fonctionne pour moi。 J'ai d'abordinstallébleachbit
自动清除,清洁倒漆。