5

I decided yesterday to upgrate QGIS from 2.16 to 2.18. This turned out to be a stupid idea, because the following happened:

After removing, purging and autoremoving qgis, python-gis and grass I tried to install the new version using the http://qgis.org/debian repositories.

The result was:

The following packages have unmet dependencies.
python-qgis : Depends: python-qt4-sql but it is not installable
               Depends: python-qgis-common (= 1:2.18.1+24xenial) but it is not going to be installed
               Depends: python-psycopg2 but it is not installable
               Depends: python-qscintilla2 but it is not installable
               Depends: python-jinja2 but it is not installable
               Depends: python-markupsafe but it is not installable
               Depends: python-dateutil but it is not installable
               Depends: python-requests but it is not installable
               Depends: python-tz but it is not installable
               Depends: python-yaml but it is not installable
               Depends: python-future but it is not installable
               Depends: python-pyspatialite but it is not installable
               Depends: libqgispython2.18.1 but it is not going to be installed
               Depends: libqgis-analysis2.18.1 but it is not going to be installed
               Depends: libqgis-core2.18.1 but it is not going to be installed
               Depends: libqgis-gui2.18.1 but it is not going to be installed
               Depends: libqgis-networkanalysis2.18.1 but it is not going to be installed
               Depends: libqgis-server2.18.1 but it is not going to be installed
               Depends: libqscintilla2-12v5 (>= 2.8.4) but it is not installable
               Recommends: liblwgeom-dev but it is not installable
 qgis : Depends: libgdal.so.1-1.11.3 but it is not installable
        Depends: libgdal1i (>= 1.8.0) but it is not installable
        Depends: libgeos-c1v5 (>= 3.4.2) but it is not installable
        Depends: libqgis-analysis2.18.1 but it is not going to be installed
        Depends: libqgis-app2.18.1 but it is not going to be installed
        Depends: libqgis-core2.18.1 but it is not going to be installed
        Depends: libqgis-gui2.18.1 but it is not going to be installed
        Depends: libqgis-networkanalysis2.18.1 but it is not going to be installed
        Depends: qgis-providers (= 1:2.18.1+24xenial) but it is not going to be installed
        Depends: qgis-common (= 1:2.18.1+24xenial) but it is not going to be installed
        Recommends: qgis-provider-grass but it is not going to be installed
 qgis-plugin-grass : Depends: qgis-provider-grass (= 1:2.18.1+24xenial) but it is not going to be installed
                     Depends: libgdal1i (>= 1.8.0) but it is not installable
                     Depends: libqgis-app2.18.1 but it is not going to be installed
                     Depends: libqgis-core2.18.1 but it is not going to be installed
                     Depends: libqgis-gui2.18.1 but it is not going to be installed
                     Depends: libqgisgrass7-2.18.1 but it is not going to be installed
                     Depends: grass-core but it is not installable
E: Unable to correct problems, you have held broken packages.

I checked online for help and found Broken packages and unmet dependency installation QGIS, PostgreSQL and postgis Ubuntu 14.04 and QGIS install on Ubuntu 14.04 fails

The problem described there is very similar to mine only that I am working on ubuntu 16.04 and the missed packages are slightly different. Unfortunately the proposed solutions doesn't work for my case:

  • Installing the named packages individually only leads to more uninstalable packages.

  • Using the ubuntugis repository results in the error message:

    The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 089EBE08314DF160

    and ignoring this again lead to no installable files.

  • Using sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 073D307A618E5811

    only leads to:

    gpg: requesting key 618E5811 from hkp server keyserver.ubuntu.com gpg: keyserver timed out gpg: keyserver receive failed: keyserver error

  • apt list --installed | grep gdal dosn't find anything

  • And installing PostGIS manually also ends up in unistalable packages.

Can somebody please tell if there is anything else I can do?

I have been struggling here for more than a day.

I assume that something is messed up with the sources but I don't know how to find out what or how to repair it.

EDIT after comments

I now managed to get around the key-server errow and access the ubntugis ppa without problems.
(The solution for this was to properly install the ppa using sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable )

Trying to install qgis using the sources deb http://qgis.org/ubuntugis xenial main deb-src http://qgis.org/ubuntugis xenial main deb http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu xenial main

again results in a number of unmet dependencies. One of them is libgdal20. Trying to install this (as recommended by ArneJ) leads to the the following unmet dependencies

libgdal20 : Depends: libarmadillo6 but it is not installable
             Depends: libcrypto++9v5 but it is not installable
             Depends: libdap17v5 but it is not installable
             Depends: libdapclient6v5 but it is not installable
             Depends: libepsilon1 (>= 0.8.1) but it is not installable
             Depends: libfreexl1 (>= 0.0.2~beta20110817) but it is not installable
             Depends: libgeos-c1v5 (>= 3.4.2) but it is not installable
             Depends: libgeotiff2 (>= 1.4.1) but it is not installable
             Depends: libhdf4-0-alt but it is not installable
             Depends: libhdf5-10 but it is not installable
             Depends: libkmlbase1 (>= 1.3.0~r864) but it is not installable
             Depends: libkmldom1 (>= 1.3.0~rc2) but it is not installable
             Depends: libkmlengine1 (>= 1.3.0~r864) but it is not installable
             Depends: libmysqlclient20 (>= 5.7.11) but it is not installable
             Depends: libnetcdf11 (>= 4.0.1) but it is not installable
             Depends: libogdi3.2 but it is not installable
             Depends: libopenjp2-7 (>= 2.0.0) but it is not installable
             Depends: libpq5 but it is not installable
             Depends: libproj9 (>= 4.8.0) but it is not installable
             Depends: libqhull7 but it is not installable
             Depends: libspatialite7 (>= 4.2.0) but it is not installable
             Depends: libxerces-c3.1 but it is not installable
             Recommends: proj-bin but it is not installable
PhilHey
  • 93
  • 1
  • 7
  • Can you show us the apt-repo source you used? Did you specify Xenial as the version of Ubuntu you're using? – DPSSpatial_BoycottingGISSE Dec 06 '16 at 16:14
  • yes, show us how the entry in your /etc/apt/sources.list file looks like. – Fitzroy Hogsflesh Dec 06 '16 at 16:27
  • I use the standard repo: deb http://qgis.org/debian xenial main deb-src http://qgis.org/debian xenial main – PhilHey Dec 06 '16 at 22:34
  • And the keyserver comand line gives me again a keyserver time out error message – PhilHey Dec 06 '16 at 22:38
  • 1
    It might be that the keyserver gets blocked by a proxy. Try the long way from http://www.qgis.org/en/site/forusers/alldownloads.html#debian-ubuntu after In case of keyserver errors starting with wget. You will not get forward with the keyserver error (but I wonder how you got QGIS 2.16 running without it). If you intend to use ubuntugis, they need similar handling of their key, see https://launchpad.net/~ubuntugis/+archive/ubuntu/ppa/ Technical details about this ppa and What is this?. – AndreJ Dec 07 '16 at 06:35
  • 1
    See http://unix.stackexchange.com/questions/75892/keyserver-timed-out-when-trying-to-add-a-gpg-public-key and http://askubuntu.com/questions/134913/cant-add-repo-keys for the keyserver timeout. – AndreJ Dec 07 '16 at 06:37
  • I now managed to access the ubuntugis-unstable ppa without error messages. So I assume(!) the keyserver thing is no longer a problem(?). Unfortunately the the core problem is still there and I have now the same list of uninstallable packages independed if I install from the debian- or the ubuntugis repository... – PhilHey Dec 07 '16 at 15:32
  • I suggest to stick to ubuntugis for now. You have to remove the debian packages, change the sources.list to qgis/ubuntugis and add the ppa there too, then try to install GDAL only. You will get different versions of the uninstalled packages, so please append the new list to your question. Then we can see further. – AndreJ Dec 08 '16 at 06:50
  • I have done so and edited the main part to show the unmet dependencies. (I assume libgdal20 is the package that I would have to install to get GDAL, right?) – PhilHey Dec 08 '16 at 12:37
  • I think you already have some packages with different version, not suitable for qgis, I once had this problem. Try once 'sudo aptitude install qgis'. – S. Thiyaku Dec 08 '16 at 12:51
  • Yes I guess that is the problem... But I unfortunatly can't install aptitudes. I get the message "Package 'aptitude' has no installation candidate" – PhilHey Dec 08 '16 at 15:29
  • If you can't install anything, this might help: http://askubuntu.com/questions/738021/fail-to-install-git-with-apt-get-on-ubuntu-14-04 and http://askubuntu.com/questions/140246/how-do-i-resolve-unmet-dependencies-after-adding-a-ppa . Maybe you have to upgrade your ubuntu first, or choose anover default repo. – AndreJ Dec 08 '16 at 17:00
  • Finally solved!!! The problem were in fact the missing software sources and [http://askubuntu.com/questions/140246/how-do-i-resolve-unmet-dependencies-after-adding-a-ppa] finally helped. (I jdon't understand how I was able to install qgis16 before,but some things have to remain a mirakle...) Thank you very much to all who tried to help, especially AndreJ ! – PhilHey Dec 09 '16 at 16:01

1 Answers1

1

Problem solved!!! The problem were in fact the missing software sources and How do I resolve unmet dependencies after adding a PPA? finally helped.

(I don't understand how I was able to install qgis16 earlier, but some mysteries have to remain unsolved...)

PhilHey
  • 93
  • 1
  • 7
  • I guess you have removed too much resources when you switched from debian to ubuntugis. And the keyserver issue had to be solved anyway. – AndreJ Dec 09 '16 at 16:40