How to compile SAGA GIS from source on Ubuntu 24.04.3 LTS
With reference to the source 'Compiling SAGA on Linux'.
https://sourceforge.net/p/saga-gis/wiki/Compiling%20SAGA%20on%20Linux/
You can also simply run these modules in QGIS but you would miss out on some excellent advantages such as having multiple map windows synchronized and a simple interface.
Current 'Debian/Ubuntu' libraries only go up to version 9.2.0.
This will install the latest version (currently 9.10.0).
1. ~$ sudo apt install libwxgtk3.2-dev libgdal-dev libproj-dev libpq-dev libpdal-dev libopencv-dev libhpdf-dev unixodbc-dev
(You may see this error:) 'E: Unable to locate package libpdal-dev' this does not prevent continuation of compilation process.
2. ~$ sudo apt-get install g++ cmake cmake-qt-gui make libtool git
3. ~$ sudo apt install libwxgtk3.2-dev
4. ~$ sudo apt install libcurl4-openssl-dev
5. ~$ sudo apt install g++ make cmake git swig python3 python3-dev python-dev-is-python3
6. ~$ sudo mkdir /home/devel
7. ~$ cd /home/devel
8. ~$ sudo git clone git://git.code.sf.net/p/saga-gis/code saga-gis-code
9. ~$ cd saga-gis-code
10. ~$ sudo mkdir build
11. ~$ cd build
12. ~$ sudo cmake ../saga-gis -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_RPATH=/usr/local/lib -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m -DPYTHON_LIBRARY=/usr/lib64/libpython3.6m.so -DPYTHON_EXECUTABLE=/usr/bin/python3.6 -DWITH_TRIANGLE=OFF -DWITH_SYSTEM_SVM=ON -DWITH_TOOLS_VIGRA=OFF -DWITH_DEV_TOOLS=ON -DSVM_INCLUDE=/usr/include/libsvm/svm.h
13. ~$ sudo cmake -LA
14. ~$ sudo cmake -LAH
15. ~$ sudo cmake-gui
Then...(in the pop-up box that appears enter the two paths as shown below the images)
![]() |
Click on the 'Configure' button first. |
![]() |
Then click on the 'Generate' button |
"Configure" then...
If all went well, press the "Generate" button otherwise resolve/edit the values marked in red, configure again, and finally generate the makefiles
16. ~$ sudo cmake --build . --config Release
17. ~$ sudo cmake --install .
18. ~$ sudo ldconfig
19. ~$ saga_gui &
Comments
Post a Comment