The ubuntu offers the GDAL package by default, but the package version is usually old. This note documents the step of installing the latest version of GDAL on Ubuntu system.
Test environment: Ubuntu 20.04 LTS (Focal Fossa) 64-bit
Installation
The current version of GDAL package can be checked using apt-cache policy gdal-bin
:
gdal-bin:
Installed: (none)
Candidate: 3.0.4+dfsg-1build3
Version table:
3.0.4+dfsg-1build3 500
500 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
To update the GDAL package to the latest version, we can add the ubuntugis-unstable PPA to system:
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt update
The source list is located at: /etc/apt/sources.list.d
, the candidate of GDAL package should be updated to the latest version:
gdal-bin:
Installed: (none)
Candidate: 3.2.1+dfsg-1~focal0
Version table:
3.2.1+dfsg-1~focal0 500
500 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu focal/main amd64 Packages
3.0.4+dfsg-1build3 500
500 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
Install the latest GDAL package:
apt install gdal-bin
Check the version of installed package using gdalinfo --version
and :
GDAL 3.2.1, released 2020/12/29
References
https://launchpad.net/~ubuntugis/+archive/ubuntu/ubuntugis-unstable