Install latest gdal in debian

krschap

Kshitij Raj Sharma

Posted on May 14, 2024

Install latest gdal in debian

Hi , I am writting short steps about how to install latest gdal version in your debian stable.

By the time I am writting this post the default version of gdal available in the stable debian bookworm is 3.6.5 but I want the latest one . Usually gdal will publish the latest release in the unstable source first. if you wanna get your hand on it either you need to install it from the source or you can install it from the unstable source. I will list how to install from unstable source only for the gdal

1) First update sour package list



 sudo nano /etc/apt/sources.list


Enter fullscreen mode Exit fullscreen mode

Add following line



deb http://deb.debian.org/debian/ unstable main contrib non-free


Enter fullscreen mode Exit fullscreen mode

2) Update package list



sudo apt update


Enter fullscreen mode Exit fullscreen mode

3) Now install gdal-bin using unstable source



sudo apt install -t unstable gdal-bin


Enter fullscreen mode Exit fullscreen mode

4) Check your gdal version



ogrinfo --version


Enter fullscreen mode Exit fullscreen mode

Image description

Hurray !

Install gdal python

if you want python installation of gdal then you can follow following steps :

  • Install gdal dev libraries ```bash

sudo apt-get install libgdal-dev

- Export env variables 
```bash


export CPLUS_INCLUDE_PATH=/usr/include/gdal
export C_INCLUDE_PATH=/usr/include/gdal


Enter fullscreen mode Exit fullscreen mode
  • Now install gdal using pip ```bash

pip install gdal==

You are all set ! 
Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
krschap
Kshitij Raj Sharma

Posted on May 14, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Install latest gdal in debian
debian Install latest gdal in debian

May 14, 2024