TransWikia.com

How to install or build GDAL 3+ on Debian buster?

Geographic Information Systems Asked by Keto on July 30, 2021

I’d like to install GDAL 3+ on Debian stable. Is this not possible? I’ve read GDAL docs and looked at Debian package tracker.

With the default source.list for Debian buster (current stable as of October 2020), only GDAL 2.4 is available. Any solution recommending adding the unstable source in this won’t work as you’d have to upgrade to Debian unstable.

EDIT: conda is a solution but doesn’t work for me. This isn’t the best solution because someone might not want to use a conda-based environment.

2 Answers

You have to install it "manually" and unfortunately you have to have also proj>=6 and other dependencies.

Here is the process:

# Check Debian version (I guess you have Buster version)
lsb_release -a
#-------------------------
# OPTIONAL --> QGIS 3.10:
# add this lines to --> sudo nano /etc/apt/sources.list
deb https://qgis.org/debian-lrt buster main
deb-src https://qgis.org/debian-lrt buster main
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key F7E06F06199EF2F2
sudo apt-get update 
apt-get install qgis qgis-plugin-grass saga 
#-----------------------------
# install dependencies
sudo apt-get install g++ sqlite3 libsqlite3-dev libtiff5-dev curl pkg-config
#-----------------------------
# install proj-7
wget https://download.osgeo.org/proj/proj-7.2.0.tar.gz
tar xvzf proj-7.2.0.tar.gz
cd proj-7.2.0
./configure --without-curl
make && make install
#-----------------------------
# Download GDAL v3.0.4 Source (ex. 3.0.4)
cd /home/user # return to your home folder
sudo wget download.osgeo.org/gdal/3.0.4/gdal304.zip
unzip gdal304.zip
cd gdal-3.0.4
./configure
sudo make clean && sudo make && sudo make install

# Set LD_LIBRARY_PATH so that recompiled GDAL is used
export LD_LIBRARY_PATH=/usr/local/lib

## Check if it works
gdalinfo --version

As you can see: here it is GDAL within Debian buster enter image description here

Correct answer by César Arquero on July 30, 2021

in case of error when run ./configure (configure: error: PROJ 6 symbols not found)

https://github.com/OSGeo/gdal/issues/1352 says to run ./configure --with-proj=/usr/local/

work for me

Answered by Laurent ABITEBOUL on July 30, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP