I've been having a lot of problems with this install, especially with various unmet dependencies. these are my system infos:
Linux
- Ubuntu 20.04.4 LTS
- 64-bit
- Gnome_Version: 3.36.8
Python
- using a "poetry environment" (uses pip)
- python Version: 3.8.10
I've been having a lot of problems with this install, especially with various unmet dependencies. these are my system infos:
Linux
Python
On
This is an add-on to the previous answer, for those who need to compile the source code of a gdal version :
start with https://gdal.org/development/dev_environment.html then https://gdal.org/development/building_from_source.html
It says that the minimum requirements to build GDAL are:
sudo apt update && sudo apt upgrade && sudo apt install build-essential
PROJ needs the following dependencies :
sudo apt-get install sqlite3
sudo apt-get install libsqlite3-dev
sudo apt-get install libtiff5-dev
sudo apt-get install curl
sudo apt-get install libcurl4-openssl-dev
Download source code of osgeo/PROJ (tar.gz) and build with the same procedure than for GDAL:
tar -xvzf proj-9.2.1.tar.gz proj-9.2.1/
cd proj-9.2.1/
mkdir build
cd build
cmake ..
cmake --build .
sudo cmake --build . --target install
Download source code of osgeo/GDAL (tar.gz -> https://github.com/OSGeo/gdal/releases) and build: It is necessary to install libgdal-dev
sudo apt-get -y install libgdal-dev
tar -xvzf gdal-3.7.0.tar.gz
cd gdal-3.7.0/
mkdir build
cd build/
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .
sudo cmake --build . --target install
I was finally able to install it more or less cleanly and get it working across the board and hope it will be usefull for others:
Installing GDAL on linux is full of problems and issues - this has resolved some of them for me:
problem depedency with libpq5
success!
problem with LOTS of dependencies
(aptitude can help resolve dependency problems)
asks how to resolve issues --> I changed to next reccomendation by pressing "." --> then confirmed by pressing "Y" -->success
after these steps are successfull check if all 3 main libs are installed: "libpq-dev, gdal-bin, libgdal-dev":
result:
check gdal version (should be 3.3.2 or higher if all went well):
PYTHON
to install gdal in a python environment should now be possible:
or
by john, this worked 06.07.2022