By some reason SAGA does not appear into Processing Toolbox list although I have checked it to be active. See screen capture. What could be the problem?
QGIS vesion is 2.18.2 and OS is Ubuntu 16.04 (Xenial).
Note: On 16.04, the default Ubuntu repositories for Xenial only include QGIS 2.8 Wein. The Q version we want is QGIS 2.18 Las Palmas (the current release as of the date of this post), which includes the version of the SAGA algorithm and API that the below solution works with. To remedy this situation, add the line
deb http://qgis.org/debian xenial main to your
/etc/apt/sources.list file and follow instructions to add the public repository key, then
sudo apt-get update to get the updated source list. Then follow the steps as below.
I tried several things before I got this to work properly. First I tried both Jesus's answer and AndreJ's answer as shown below, then added my own solution. The solution I came up with ends up being kind of hacky, but it works. Some of these steps may be superfluous:
deb http://ftp.ussg.iu.edu/linux/ubuntu xenial main universeto the
Removed SAGA, QGIS and associated dependencies:
$ sudo apt-get purge saga libsaga qgis; sudo apt-get autoremove;
Installed proper SAGA version using:
$ sudo apt-get update; sudo apt-get install saga=2.2.3+dfsg-1build1 libsaga=2.2.3+dfsg-1build1
apt not to touch
libsaga when installing updates
$ sudo apt-mark hold saga libsaga
$ sudo apt-get install qgis
At this point I was still not seeing the SAGA plugin. I decided to poke around in
/usr/share/qgis/python/plugins/processing/algs/saga because I was desperate. I found the following statement in
/usr/share/qgis/python/plugins/processing/algs/saga/SagaAlgorithmProvider.py beginning on line 76:
if not version.startswith('2.3.'): ProcessingLog.addToLog(ProcessingLog.LOG_ERROR, self.tr('Problem with SAGA installation: unsupported SAGA version found.')) return
Because the version we now have is 2.2.3, I modified line 76 to be:
if not version.startswith('2.'):
Then I restarted Q, and it works! Thank you Jesus and AndreJ for the help. Upvoted for providing a terrific lead to follow.
If you look into the code at https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/saga/SagaAlgorithmProvider.py you will see that SAGA up to version 2.2.3 is supported.
The main Ubuntu repository still has SAGA 2.2.3 for Xenial (which works for me on Linux Mint 18 too), while Ubuntugis stable has SAGA 2.2.7 which seems to fail with the QGIS processing plugin.
See https://hub.qgis.org/issues/13279 on the problems between SAGA versions and QGIS processing.
Apart from that, you still might have a version of processing as an external plugin. These were located under
Make sure to remove that folder to avoid any interfering between the current core and the outdated external version of the plugin.
Finally I solved the problem. Here's what I did:
1: I installed SAGA 2.2.3 with your dependencies:
sudo apt-get install saga=2.2.3+dfsg-1build1 libsaga=2.2.3+dfsg-1build1
And I make sure that I have version 2.2.3 with
But SAGA still did not appear in the toolbox
2: According this link, I had a ~/.qgis2/python/plugins/processing/algs/saga folder. I remove ~/.qgis2 and everything ok.
I reinstall the add-ons and I already have the new .qgis2 folder.
Now SAGA is in processing toolbox! Thanks @AndreJ.!
Same error: Ubuntu 16.04 and QGIS 2.18.3. It's enough to change line 76 in
/usr/share/qgis/python/plugins/processing/algs/saga/SagaAlgorithmProvider.py like this:
if not version.startswith('2.2.'):
And Saga is back in Toolbox.
I had the same problem, to solve just compile the 2.2.3 version of saga (do not install from ubuntugis). It works with these configuration:
Just have to compile SAGA from source (link to version download), DO NOT install from any repository. This works with ltr qgis repository too.
Don't get worried. All you need to do is install SAGA on your system. It happened in my System as well. I tried many suggestions available on the internet but without success. I was really confused about what to do and I thought it would be very difficult.
Then Luck favored me. I thought I would give a try by myself.
I simply wrote this on my terminal and ran it.
sudo apt install saga
And there it is. It works. The simplest solution to that problem is found.
All the best.