Installing on Linux

Install libraries via apt

Launch terminal, type:

sudo apt install spatialite-bin

It will download and install SpatiaLite and some other libraries. It will use about 25 MB of disk space. If it installed correctly, after typing spatialite on the same terminal will display SpatiaLite information:


peter@Comp:~$ spatialite
SpatiaLite version ..: 4.3.0a Supported Extensions:
- 'VirtualShape' [direct Shapefile access]
- 'VirtualDbf' [direct DBF access]
- 'VirtualXL' [direct XLS access]
- 'VirtualText' [direct CSV/TXT access]
- 'VirtualNetwork' [Dijkstra shortest path]
- 'RTree' [Spatial Index - R*Tree]
- 'MbrCache' [Spatial Index - MBR cache]
- 'VirtualSpatialIndex' [R*Tree metahandler]
- 'VirtualElementary' [ElemGeoms metahandler]
- 'VirtualXPath' [XML Path Language - XPath]
- 'VirtualFDO' [FDO-OGR interoperability]
- 'VirtualGPKG' [OGC GeoPackage interoperability]
- 'VirtualBBox' [BoundingBox tables]
- 'SpatiaLite' [Spatial SQL - OGC]
PROJ.4 version ......: Rel. 4.9.2, 08 September 2015
GEOS version ........: 3.5.0-CAPI-1.9.0 r4084
TARGET CPU ..........: x86_64-linux-gnu
the SPATIAL_REF_SYS table already contains some row(s)
SQLite version ......: 3.11.0
Enter ".help" for instructions
SQLite version 3.11.0 2016-02-15 17:29:24
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
spatialite>

Install GUI version via apt

In terminal, type: sudo apt install spatialite-gui

And again all is pretty simple. Anwer Yes when promted, and you have SpatiaLite GUI interface, it uses additional 25 MB of free space. To test it, type spatialite-gui in terminal, it will launch GUI window without any open databases, like the image below:

Linux-Ubuntu-1604LTS-GUI-empty
Empty SpatiaLite window on Linux Ubuntu 16.04 LTS

Other Ubuntu versions

In 2013, Timo Grossenbacher wrote how to install SpatiaLite and SpatiaLite GUI for Ubuntu 12.04.

The FAIMS project has instructions how to install SpatiaLite for Ubuntu 12.04 LTS (dated 2013).

Kristina Hager has provided Docker container for SpatiaLite on Ubuntu 15.10.

Ubuntu package index has more versions, including 4.3.0a.

Building from sources

Gaia-SINS provides build instructions for Linux at http://www.gaia-gis.it/gaia-sins/linux_how_to.html.

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *