

Installing PostGIS from source – 3rd step to upgrade GEOS with Ubuntuīuild requirements must first be installed to the system.
Install cmake 3.9 on ubuntu 16.04 install#
Second, download and extract the latest source tar from the GEOS website – and finally, build and install GEOS.Īgain, cross-check the geos-configuration with geos-config. $> sudo apt-get install cmake clang libgeos-devĬontinue by assessing the current geos-configuration with geos-config to confirm the basis. Installing GEOS from source – 2nd step to upgrade GEOS with Ubuntuįirst, install the necessary build requirements. Let’s get our hands dirty and build GEOS from scratch. For clarification – it’s not sufficient to update GEOS alone, PostGIS must also be rebuilt against the required GEOS. This implies building GEOS from source, or switching to another distribution channel-respective repository. Unfortunately, Ubuntu does not serve GEOS versions later than 3.8.0 through default repositories for 20.04. Postgis_demo=# select postgis_full_version() Here are the 3 steps to do that: Assess existing libraries – 1st step to upgrade GEOS with UbuntuĪs a reminder – to quickly assess which libraries have been installed in the system and particular database, execute the following commands from your psql console or preferred database client. Postgis_demo=# SELECT ST_AsText(ST_ReducePrecision('POINT(1.412 19.323)', 0.1)) ĮRROR: Precision reduction requires GEOS-3.9 or higher Her system seems to be equipped with GEOS 3.8.0. Unfortunately, this function requires at least GEOS 3.9.0. She wants to test ST_ReducePrecision ( ), a spatial function introduced in PostGIS 3.1.0. Here’s our scenario:Ī customer runs a PostgreSQL 14.5 database with PostGIS 3.2.3 installed under Ubuntu 20.04.4 LTS.

Install cmake 3.9 on ubuntu 16.04 how to#
Let’s see how to get the latest PostGIS libraries. In our example, we’ll upgrade GEOS with Ubuntu. Unfortunately, not all repositories serve PostGIS with the latest libraries. Since PostGIS’ functionality stack relies heavily on these libraries, downloading current library versions is unavoidable you want to use the latest stunning spatial features. Today we’ll talk about upgrading related libraries such as GEOS or GDAL. Many blog posts deal with installing or upgrading PostGIS.
