Installing QGIS 2.14 Essen on Ubuntu 16.04 Xenial – A Step by Step Guide

installationqgisUbuntu

I'm having trouble installing QGIS on Xenial.

`debian` release

When I try using the debian release (i.e. without ubuntugis dependencies) I get the following errors (please note there is no xenial release so I've used wily when setting up the 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.

`ubuntugis` release

After failing with the debian release I've tried the ubuntugis release by adding the ubuntugis-unstable PPA (again I used the wily release of ubuntugis for consistency with the QGIS release):

:~$ 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.

The line E: The repository 'http://qgis.org/ubuntugis wily Release' does not have a Release file. looked pretty fatal so I tried trusty (the most recent supported release). This updated, but when trying to install:

:~$ 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.

Finally, for the sake of completeness, with the xenial release of ubuntugis:

$ 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 but it is not installable
        Depends: libgdal1h (>= 1.8.0) but it is not installable
        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 installable
                     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.

Hopefully a release of QGIS for Xenial will be made available soon, but has anyone managed to install QGIS 2.14 on Xenial?

Best Answer

It looks like there actually is Xenial support in the debian repository and although I haven't tried the following solution myself I guess it is worth a try.

Before trying the following I would uninstall all previous qgis packages using sudo apt-get remove qgis python-qgis qgis-plugin-grass and remove deb http://qgis.org/debian wily main and deb-src http://qgis.org/debian wily main from /etc/apt/sources.list.

EDIT To remove packages that are installed as automatic dependencies when installing qgis, run the command sudo apt-get autoremove after running the above commands to remove them. END EDIT

The following is adapted from qgis.org to include the xenial keyword.

Add the following to your /etc/apt/sources.list :

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

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

then execute:

sudo apt-get update

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

I'm very interested to hear if you get it working.

Related Question