[GIS] Installation of QGIS on ubuntu 14.04 LTS trusty

installationqgisqgis-2.18Ubuntu

I am having the same problems as in those previous posts

Though here the compilation failed with qgis 2.18.

I tried in my sources.list

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

as in post 2 above but I have dependencies issues. I then tried with

deb http://qgis.org/ubuntugis trusty main
deb-src http://qgis.org/ubuntugis trusty main

The installation failed at the configuration of qgis-providers with

/usr/lib/qgis/crssync: symbol lookup error: /usr/lib/libgdal.so.20: undefined symbol: GEOSDelaunayTriangulation_r

To solve this issue, I installed the latest gdal librairy, gdal-2.1.2.
The gdal lib comming with qgis was libgdal.so.20.1.0

This solved the above error, however the installation failed again when setting upqgis-providers, now with this error

/usr/lib/qgis/crssync: symbol lookup error: /usr/lib/libqgis_core.so.2.18.1: undefined symbol: GEOSNearestPoints_r

I also tried the installation with the unstable ubuntugis repository (ie qgis version 2.14) and got exact same problems. but apparently qgis 2.14 is not more supported according to the comments in post 1 above.

EDIT 1:

that's what I have been running

clean existing repositories

sudo add-apt-repository --remove ppa:ubuntugis/ubuntugis-unstable
sudo add-apt-repository --remove ppa:ubuntugis

clean existing package

sudo apt-get remove gdal*
sudo apt-get remove libgdal*
sudo apt-get remove qgis*
sudo apt-get remove libgqgis*
sudo apt-get autoremove

in sources.list

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

then update and install

sudo apt-get update 
sudo apt-get install qgis python-qgis

which gives

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  gdal-bin grass-core libfreexl1 libgdal1h liblwgeom-2.1.2 liblwgeom-dev
  libqgis-analysis2.18.1 libqgis-app2.18.1 libqgis-core2.18.1
  libqgis-customwidgets libqgis-gui2.18.1 libqgis-networkanalysis2.18.1
  libqgis-server2.18.1 libqgisgrass6-2.18.1 libqgispython2.18.1 libspatialite5
  python-gdal python-pyspatialite python-qgis-common python-shapely
  qgis-common qgis-plugin-grass qgis-plugin-grass-common qgis-provider-grass
  qgis-providers qgis-providers-common
Suggested packages:
  grass-doc grass-gui grass-dev e00compr avce00 gpsbabel gpstrans python-rpy2
  xml2
The following NEW packages will be installed
  gdal-bin grass-core libfreexl1 libgdal1h liblwgeom-2.1.2 liblwgeom-dev
  libqgis-analysis2.18.1 libqgis-app2.18.1 libqgis-core2.18.1
  libqgis-customwidgets libqgis-gui2.18.1 libqgis-networkanalysis2.18.1
  libqgis-server2.18.1 libqgisgrass6-2.18.1 libqgispython2.18.1 libspatialite5
  python-gdal python-pyspatialite python-qgis python-qgis-common
  python-shapely qgis qgis-common qgis-plugin-grass qgis-plugin-grass-common
  qgis-provider-grass qgis-providers qgis-providers-common
0 to upgrade, 28 to newly install, 0 to remove and 0 not to upgrade.
Need to get 0 B/71.8 MB of archives.
After this operation, 265 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Selecting previously unselected package libfreexl1:amd64.
(Reading database ... 1316497 files and directories currently installed.)
Preparing to unpack .../libfreexl1_1.0.0g-1ubuntu0.14.04.2_amd64.deb ...
Unpacking libfreexl1:amd64 (1.0.0g-1ubuntu0.14.04.2) ...

… lots of Unpacking …

Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for mime-support (3.54ubuntu1.1) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for shared-mime-info (1.2-0ubuntu3) ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Unknown media type in type 'uri/mms'
Unknown media type in type 'uri/mmst'
Unknown media type in type 'uri/mmsu'
Unknown media type in type 'uri/pnm'
Unknown media type in type 'uri/rtspt'
Unknown media type in type 'uri/rtspu'
Setting up libfreexl1:amd64 (1.0.0g-1ubuntu0.14.04.2) ...
Setting up libspatialite5:amd64 (4.1.1-5ubuntu1) ...
Setting up qgis-providers-common (1:2.18.1+20trusty) ...
Setting up libgdal1h (1.10.1+dfsg-5ubuntu1) ...
Setting up libqgis-core2.18.1 (1:2.18.1+20trusty) ...
Setting up libqgis-gui2.18.1 (1:2.18.1+20trusty) ...
Setting up qgis-providers (1:2.18.1+20trusty) ...
/usr/lib/qgis/crssync: symbol lookup error: /usr/lib/libqgis_core.so.2.18.1: undefined symbol: GEOSNearestPoints_r
dpkg: error processing package qgis-providers (--configure):
 subprocess installed post-installation script returned error exit status 127
Setting up gdal-bin (1.10.1+dfsg-5ubuntu1) ...
Setting up grass-core (6.4.3-3) ...
Setting up liblwgeom-2.1.2 (2.1.2+dfsg-2ubuntu0.1) ...
Setting up liblwgeom-dev (2.1.2+dfsg-2ubuntu0.1) ...
Setting up libqgis-analysis2.18.1 (1:2.18.1+20trusty) ...
Setting up libqgis-app2.18.1 (1:2.18.1+20trusty) ...
Setting up libqgis-customwidgets (1:2.18.1+20trusty) ...
Setting up libqgis-networkanalysis2.18.1 (1:2.18.1+20trusty) ...
Setting up libqgis-server2.18.1 (1:2.18.1+20trusty) ...
Setting up libqgisgrass6-2.18.1 (1:2.18.1+20trusty) ...
Setting up libqgispython2.18.1 (1:2.18.1+20trusty) ...
Setting up python-gdal (1.10.1+dfsg-5ubuntu1) ...
Setting up python-shapely (1.3.0-1) ...
Setting up python-qgis-common (1:2.18.1+20trusty) ...
Setting up python-pyspatialite (3.0.1-4) ...
Setting up python-qgis (1:2.18.1+20trusty) ...
Setting up qgis-common (1:2.18.1+20trusty) ...
No apport report written because the error message indicates it's a follow-up error from a previous failure.
                                                                                                            dpkg: dependency problems prevent configuration of qgis:
 qgis depends on qgis-providers (= 1:2.18.1+20trusty); however:
  Package qgis-providers is not configured yet.

dpkg: error processing package qgis (--configure):
 dependency problems - leaving unconfigured
Setting up qgis-plugin-grass-common (1:2.18.1+20trusty) ...
Setting up qgis-provider-grass (1:2.18.1+20trusty) ...
dpkg: dependency problems prevent configuration of qgis-plugin-grass:
 qgis-plugin-grass depends on qgis (= 1:2.18.1+20trusty); however:
  Package qgis is not configured yet.

dpkg: error processing package qgis-plugin-grass (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates it's a follow-up error from a previous failure.
                                                                                                            Processing triggers for libc-bin (2.19-0ubuntu6.9) ...
E: Sub-process /usr/bin/dpkg returned an error code (1)

EDIT 2:

when following the same commands than in EDIT 1
but using in the sources.list

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

the installation still crashes with qgis-providers but complains about gdal

/usr/lib/qgis/crssync: symbol lookup error: /usr/lib/libgdal.so.20: undefined symbol: GEOSDelaunayTriangulation_r

Best Answer

The installation error seems to come from libspatialite5. There are two versions available for trusty:

  • 4.1.1-5ubuntu1 from the main ubuntu repo. It depends on libgeos-c1 and libgdal1h, and is used by qgis.org/debian

  • 4.1.1-5ubuntu2 from ubuntugis ppa. It is compiled against libgeos-c1v5 and libgdal20, and is used by qgis.org/ubuntugis.

Unfortunately, the libspatialite dependencies are not detected by the qgis packages.

You have to decide which path to install, and avoid mixing packages from both.


A clean install on a fresh Ubuntu inside a Virtual Box seems to solve the problem. On the host system, cleaning the system according to https://askubuntu.com/questions/231562/what-is-the-difference-between-apt-get-purge-and-apt-get-remove might solve the issue.

Related Question