1

I messed up my QGIS install by trying to update to 3.22 on Ubuntu 18.04.6 LTS (5.4.0-90-generic x86_64 GNU/Linux).

Now QGIS 3.16 is gone (it was the one installed). And 3.22 is not installable due to an "unmet dependencies" nightmare.

According to: Error adding qgis.org repository public key to apt keyring this is my current state:

$ gpg --list-keys
/home/username/.gnupg/pubring.kbx
--------------------------------
pub   rsa2048 2017-08-16 [SC] [expired: 2019-08-16]
      61E0A086749E463EDE502255CAEB3DC3BDF7FB45
uid           [ expired] QGIS Archive Automatic Signing Key (2017) <qgis-developer@lists.osgeo.org>

pub   rsa1024 2013-08-18 [SC] [expired: 2014-08-18]
      EACA3AA4BA80987F1854B1C9BBA6491F47765B75
uid           [ expired] Quantum GIS Archive Automatic Signing Key (2013) <qgis-developer@lists.osgeo.org>

but it seems I have trouble to get that GPG key, even so I clearly follow what is explained here: https://qgis.org/en/site/forusers/alldownloads.html#debian-ubuntu :

$ wget -qO - https://qgis.org/downloads/qgis-2021.gpg.key | sudo gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/qgis-archive.gpg --import
gpg: WARNING: unsafe ownership on homedir '/home/username/.gnupg'
gpg: key 46B5721DBBD2996A: 1 signature not checked due to a missing key
gpg: key 46B5721DBBD2996A: "QGIS Archive Automatic Signing Key (2021) <qgis-developer@lists.osgeo.org>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

but still no changes in the gpg keys list.

What does the 1 signature not checked due to a missing key exactly mean in that output?

This is my apt list file concerning QGIS for the moment:

$ cat /etc/apt/sources.list.d/qgis.list
deb http://qgis.org/ubuntu bionic main
deb-src http://qgis.org/ubuntu bionic main

and trying an install gives:

$ sudo apt-get install qgis

Reading package lists... Done
Building dependency tree       
Reading state information... Done

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

The following information may help to resolve the situation:

The following packages have unmet dependencies:
 qgis : Depends: libexiv2-27 (>= 0.27.3) but it is not installable
        Depends: libgcc-s1 (>= 3.0) but it is not installable
        Depends: libgdal28 (>= 1.11) but it is not installable
        Depends: libqgis-3d3.22.0 but it is not going to be installed
        Depends: libqgis-analysis3.22.0 but it is not going to be installed
        Depends: libqgis-app3.22.0 but it is not going to be installed
        Depends: libqgis-core3.22.0 but it is not going to be installed
        Depends: libqgis-gui3.22.0 but it is not going to be installed
        Depends: libqt5core5a (>= 5.15.1) but 5.9.5+dfsg-0ubuntu2.6 is to be installed
        Depends: libqt5network5 (>= 5.15.1) but 5.9.5+dfsg-0ubuntu2.6 is to be installed
        Depends: libqt5webkit5 (>= 5.212.0~alpha3) but 5.212.0~alpha2-7ubuntu1 is to be installed
        Depends: python3-qgis (= 1:3.22.0+16bullseye) but it is not going to be installed
        Depends: qgis-providers (= 1:3.22.0+16bullseye) but it is not going to be installed
        Recommends: qgis-plugin-grass but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

These were worth a try but have not produced tangible results:
https://askubuntu.com/a/355319/571173
Broken packages and unmet dependency installation QGIS, PostgreSQL and postgis Ubuntu 14.04

I also tried other ppa:

each and every one gives some other version of the "unmet dependencies" as shown above (unless absolutely needed, I don't necessarily want to print them all here).

apt-get -f install, apt-get autoremove --purge and apt-get autoclean were also used and never shown extraordinary output on stdout.

It was roughly the 10th (and probably last) time in several years I tried upgrading using the ubuntugis repos, because everything exploded into pieces. :/

Any hints to clean that up?
Either back to 3.16 or to the newest 3.22?

3
  • 1
    It is impossible to have QGIS 3.22 on Ubuntu 18.04.6 LTS (5.4.0-90-generic x86_64 GNU/Linux) because its python is too old for 3.20 or 3.22 in bionic. It is mandatory upgrade to 20.04 (LTS). You can get more information here: qgis.org/en/site/forusers/alldownloads.html#id11
    – xunilk
    Nov 21, 2021 at 22:37
  • Hmm, thanks for that precious hint! So I guess I'll have to try cleaning those 3.22 package dependencies... :/ Nov 22, 2021 at 21:11
  • 1
    You don't have any issue with the "QGIS Archive Automatic Signing Key (2021)": it is already in the apt keyring. With gpg --list-keys you are looking for keys in the /home/username/.gnupg/pubring.kbx keyring, while with wget -qO - qgis.org/downloads/qgis-2021.gpg.key | sudo gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/qgis-archive.gpg --import you are importing the key into the /etc/apt/trusted.gpg.d/ keyring Nov 23, 2021 at 10:05

1 Answer 1

3

It was roughly the 10th (and probably last) time in several years I tried upgrading using the ubuntugis repos, because everything exploded into pieces.

I think the command you used to update GPG key is not for the UbuntuGIS repos; it's for the repo from the official QGIS website.

deb     https://qgis.org/debian xxx main

Just as you, I've used the UbuntuGIS repo for a long time, and then switched to the above one a couple of years ago when Ubuntu 20.04 LTS were made available. My impression is that it was difficult to upgrade the stock gdal to the latest 2.x versions in the old Ubuntu 18.04. Upgrading to 20.04 was the easiest solution as it comes with the newer gdal libraries by default.

In addition, as @xunilk correctly points out with the link, the python in Ubuntu 18.04 is also too old. According to the linked QGIS website, support for Ubuntu 18.04 is only up to QGIS 3.18.

So the GPG key issue is likely because it's for a different repo, and the unmet dependencies is likely due to the OS being too old (for GDAL and python). Switching to Ubuntu 20.04 and the QGIS debian repo is a potential solution.

2
  • And the switch will be, for sure! But in between I'd like to be able, if feasible without much pain, to get back to the 3.16.3 version that was originally installed. Do you know the steps for that? Nov 22, 2021 at 21:33
  • 1
    @swiss_knight based on answers in this question: gis.stackexchange.com/questions/77230, it seems that you will need to compile from source to get older versions back, and not with apt. That's why I sometimes use apt-mark hold qgis to fix qgis at a known good version (for production), and only upgrade after testing it elsewhere. One comment did say "they offer the LTR now". So maybe some apt tricks can help you revert to the older version.
    – tinlyx
    Nov 22, 2021 at 22:06

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.