4

Following the QGIS installation guide I have tried both UbuntuGIS and QGIS stable, but both fail with the error message:

The following packages have unmet dependencies:

python-qgis : Depends: python-qgis-common (= 2.6.1.1+trusty1) but it is not going to be installed

           Depends: libqgispython2.6.1 but it is not going to be installed
           Depends: libqgis-analysis2.6.1 but it is not going to be installed
           Depends: libqgis-core2.6.1 but it is not going to be installed
           Depends: libqgis-gui2.6.1 but it is not going to be installed
           Depends: libqgis-networkanalysis2.6.1 but it is not going to be installed

qgis : Depends: libgdal1h (>= 1.8.0) but it is not going to be installed

    Depends: libqgis-analysis2.6.1 but it is not going to be installed
    Depends: libqgis-core2.6.1 but it is not going to be installed
    Depends: libqgis-gui2.6.1 but it is not going to be installed
    Depends: libqgis-networkanalysis2.6.1 but it is not going to be installed
    Depends: qgis-providers (= 2.6.1.1+trusty1) but it is not going to be installed
    Recommends: qgis-plugin-grass but it is not going to be installed
    Recommends: qgis-plugin-globe but it is not going to be installed

E: Unable to correct problems, you have held broken packages.


I had QGISv.2.4 running on my machine with Ubuntu 12.04. After upgrading to Ubuntu 14.04 I was getting error message that pyqgis could not be loaded.

So I uninstalled QGIS using the Ubuntu Software Center and also run

sudo apt-get purge qgis

After that I tried to install the latest version of QGIS Debian Stable and UbuntuGIS unstable but getting the error messages described above.

The weird thing is that neither Ubuntu Software Center nor apt-get list have QGIS listed as installed, but if I run a search for qgis on my file system qgis and all its dependencies are still there. That's why I getting told to have broken packages.

1

I guess your problem is rather How to remove an old version of QGIS completely before re-installing. Mixing ubuntugis and qgis debian packages might lead to unexpected behaviour.

On updating from QGIS 2.6.0 to 2.6.1 I noticed that some ubuntugis packages (qgis, python-qgis and one other) were not upgraded, but manually forcing the install did the trick.

  • Yeah, pretty much that's the problem caused by upgrading Ubuntu 12.04 LTS to 14.04 LTS with PyGIS not compatible anymore. Originally I installed QGIS(2.4) via Ubuntu Software Center and I uninstalled QGIS via this too, but this seems to have left a mess. – bardu Dec 16 '14 at 19:12
1

I actually had removed qgis (with sudo apt-get autoremove qgis and sudo apt-get --purge remove qgis) to get a fresh install.. but I still got your error message

what helped me was:

  1. adding the qgis debian sources back to /etc/apt/sources.list (they where commented due to the ubuntu upgrade)
  2. adding the keys to be able to update: gpg --keyserver keyserver.ubuntu.com --recv DD45F6C3 gpg --export --armor DD45F6C3 | sudo apt-key add -
  3. sudo apt-get update
  4. enforced update of libqgis-customwidgets with sudo apt-get upgrade libqgis-customwidgets
  5. install of QGIS: sudo apt-get install qgis python-qgis
1

I had to deal with this same problem today. QGis was removed from the system because libgdal1h was marking conflicting dependencies.

I found out these conflicts were coming from the QGis PPA itself. I removed it from my sources.list and then created a reference to the UbuntuGis-Unstable PPA. After that was just a matter of running:

sudo apt update && sudo apt install qgis

0

I think there's a problem with some of their repositories, causing this. What worked for me is the following:

1. Disable all PPAs

This answer explains in detail how under the title "Disable/Remove/Purge PPAs". I disabled all of them, not only the ones associated with QGIS, for good measure.

2. Remove current QGIS

in terminal, run

sudo apt-get update
sudo apt-get purge qgis
sudo apt-get autoremove
sudo apt-get clean
sudo apt-get autoclean

3. Install new QGIS

at this point to install the default version of QGIS from the Ubuntu repository, run in the terminal sudo apt-get update && sudo apt-get install qgis

This worked for me, but installed QGIS 2.0 Dufour (and also had some minor exceptions starting up). I wanted a newer version. To pick the right repository for your desired version and add it, see the this page on the qgis.org website (instructions how to add the repository are there, scroll down). I wanted the latest one, 2.18 Las Palmas, and so I chose the repository http://qgis.org/debian. For me, it was adding the line deb http://qgis.org/debian trusty main in the same place in the Software Center through which I disabled the PPAs. Then in the terminal sudo apt-get update && sudo apt-get install qgis

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.