I have switched to a new computer, and need to re-install QGIS 2.8. I imagine some database changes have happened since I last installed it, because now, even though I direct installation to the http://qgis.org/debian-ltr (2.8) repository, it still assumes that sudo apt-get install qgis is meant for 2.10. The 2.10 repository is http://qgis.org/debian. I have installed 2.8 many times before with this same method, so I'm pretty baffled as to what's going on.

Proof of my repository:

enter image description here

I run sudo apt-get install qgis python-qgis and get this error:

The following packages have unmet dependencies:
 python-qgis : Depends: python-qgis-common (= 1:2.8.3+20trusty) but 1:2.10.1+20trusty is to be installed
 qgis : Depends: qgis-providers (= 1:2.8.3+20trusty) but 1:2.10.1+20trusty is to be installed
 Depends: qgis-common (= 1:2.8.3+20trusty) but 1:2.10.1+20trusty is to be installed

I have the 2.8 repository set, but for some reason the install qgis command looks for the 2.10 repository instead. When I set the repository to http://qgis.org/debian, it goes ahead and installs 2.10. What is going on here?

  • what do you see if you type apt-cache madison qgis? – Rob Skelly Oct 22 '15 at 19:38
  • @RobSkelly qgis | 1:2.8.3+20trusty | http://qgis.org/debian-ltr/ trusty/main amd64 Packages qgis | 2.0.1-2build2 | http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages qgis | 2.0.1-2build2 | http://us.archive.ubuntu.com/ubuntu/ trusty/universe Sources qgis | 1:2.8.3+20trusty | http://qgis.org/debian-ltr/ trusty/main Sources – Alex92 Oct 22 '15 at 19:42
  • See my answer bellow, if you are lucky like me you will not even need to do thing in order just run the 'autoremove' line ;) – MarHoff Oct 22 '15 at 20:03

Solved this myself.

I installed Synaptic Package Manager with sudo apt-get install synaptic, then searched all packages with "qgis" in the name. I found around 10 packages on my computer that were taken from the 2.10 repo. I deleted all of them, leaving only the 2.8 ones left. Tried sudo apt-get install qgis python-qgis again and it worked like a charm.

I guess all the purge, autoremove etc commands I tried didn't end up actually removing everything relevant to a new install.


What are exactly the commands you tried to uninstall 2.10? I would have tied tried this

sudo apt-get --purge remove qgis

And then you must input this line to also remove all automatically installed dependencies

sudo apt-get autoremove

Then switched to qgis-ltr repo and perform the install

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install qgis

Should work, just tried on a VM.

  • I tried this and still got the unmet dependencies error shown in my initial post. sudo apt-get install qgis seems to be trying to install 2.10, even though I am pointing to the 2.8 repo. Very confused. – Alex92 Oct 22 '15 at 20:22
  • This can actually be caused by the way you installed it in the first place. If you initially specified something else than just qgis at first install, this 'something else' must be specified as well during at uninstall and wont be removed by autoremove. Or so i guess. – MarHoff Oct 22 '15 at 23:50
  • Also and to be more specific I don't think apt try to install 2.10. It's just that he found more up-to-date dependencies than those needed by the main package. And in some of theses 2.10 dependencies there is a reference to 2.10 main package (which you removed). So the installer is stuck until you either remove all those out-of sync dependencies or you switch back to the "more up to date" repository. Normally auto-remove is here to help, but it all depend on how you installed in first place as i said in last comment. – MarHoff Oct 23 '15 at 10:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.