2

I tried to update QGIS 3.10 to a newer version on Ubuntu 18.04 (bionic) but it fails every time due to brocken packages probably. I've already followed instructions on https://qgis.org/it/site/forusers/alldownloads.html#debian-ubuntu and https://linuxhint.com/install-qgis3-geospatial-ubuntu/ but it didnt help me.

I have modified the sources.list (sudo nano /etc/apt/sources.list ) several times with all possible repositories but nothing helped and now I'm totally lost.

After changing the sources.list I updated (sudo apt update) and tried to install QGIS (sudo apt install qgis qgis-plugin-grass ) but everytime I get this information:

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: libgdal20 (>= 1.8.0) but it is not going to be installed
        Depends: libqgis-3d3.16.3 but it is not going to be installed
        Depends: libqgis-analysis3.16.3 but it is not going to be installed
        Depends: libqgis-app3.16.3 but it is not going to be installed
        Depends: libqgis-core3.16.3 but it is not going to be installed
        Depends: libqgis-gui3.16.3 but it is not going to be installed
        Depends: python3-qgis (= 1:3.16.3+28bionic) but it is not going to be installed
        Depends: qgis-providers (= 1:3.16.3+28bionic) but it is not going to be installed
        Depends: qgis-common (= 1:3.16.3+28bionic) but 3.10.12+dfsg-1~bionic1 is to be installed
 qgis-plugin-grass : Depends: qgis-provider-grass (= 1:3.16.3+28bionic) but 3.10.12+dfsg-1~bionic1 is to be installed
                     Depends: grass740 but it is not installable
                     Depends: libgdal20 (>= 1.8.0) but it is not going to be installed
                     Depends: libqgis-app3.16.3 but it is not going to be installed
                     Depends: libqgis-core3.16.3 but it is not going to be installed
                     Depends: libqgis-gui3.16.3 but it is not going to be installed
                     Depends: libqgisgrass7-3.16.3 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

And my sources.list looks like this:

  GNU nano 2.9.3                                                                                  /etc/apt/sources.list                                                                                            

deb https://qgis.org/debian bionic main
# deb http://qgis.org/ubuntu bionic main
# deb cdrom:[Ubuntu 18.04 _Bionic_ - Build amd64 LIVE Binary 20180608-09:38]/ bionic main

# deb http://qgis.org/ubuntu-ltr/ bionic main
# deb-src http://qgis.org/ubuntu-ltr/ bionic main

# deb http://archive.ubuntu.com/ubuntu bionic multiverse restricted universe main
# deb-src http://archive.ubuntu.com/ubuntu bionic multiverse restricted universe main #Added by software-properties
# deb-src https://qgis.org/ubuntu bionic main

# deb http://ppa.launchpad.net/ubuntugis/ppa/ubuntu bionic main
# deb-src http://ppa.launchpad.net/ubuntugis/ppa/ubuntu bionic main
# deb http://qgis.org/debian bionic main
deb-src http://qgis.org/debian bionic main
# deb https://qgis.org/debian bionic main

#deb https://qgis.org/ubuntu bionic main

# deb https://qgis.org/ubuntugis bionic main
# deb-src https://qgis.org/ubuntugisbionic main

#deb http://de.archive.ubuntu.com/ubuntu bionic main restricted

# deb-src http://de.archive.ubuntu.com/ubuntu bionic main restricted universe multiverse

#deb http://de.archive.ubuntu.com/ubuntu bionic-updates main restricted
# deb-src http://de.archive.ubuntu.com/ubuntu bionic-updates main restricted universe multiverse

#deb http://de.archive.ubuntu.com/ubuntu bionic universe
#deb http://de.archive.ubuntu.com/ubuntu bionic-updates universe

# deb-src http://de.archive.ubuntu.com/ubuntu bionic-security main restricted universe multiverse

# deb http://de.archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse
# deb-src http://de.archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse

# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner
# deb https://qgis.org/ubuntu main
# deb-src https://qgis.org/ubuntu main

Can anyone tell me where the problem is?

0
1

Start by installing libgdal20, then qgis together with python3-qgis. This should narrow down the list of "not going to be installed".

It might also be necessary to run

sudo apt-get remove libproj15

I mnanaged to get QGIS 3.16.9 running with qgis.org/ubuntugis-ltr bionic main.

Update from comments:

It seems you have used ubuntugis in the past to update GDAL to version 3, so I suggest to stick to that toolchain. Libgdal20 is not needed in this case.

Looking at your sources.list, it looks you have disabled everything except QGIS. So you may run sudo apt update as often as you want, but it will not update any system files. Current QGIS packages are always build against a current version of the OS.

Remove the # from any line with de.archive.ubuntu.com and archive.canonical.com, or use the icon Package sources to select a mirror like ftp.halifax.rwth-aachen.de (which I use on Linux Mint).

After updating the system, QGIS should be installable.

9
  • when trying to install libgdal it says: "libgdal20 : Depends: gdal-data (>= 2.4.2+dfsg-1~bionic0) but it is not going to be installed" so I tried to install gdal-data before. It says "gdal-data is already the newest version (3.0.4+dfsg-1~bionic0)." but I still get the above mentioned error
    – OmteK.
    Aug 13 '21 at 15:21
  • Running "sudo apt install qgis" with qgis.org/ubuntugis-ltr bionic main gives me "qgis is already the newest version (3.10.12+dfsg-1~bionic1)"
    – OmteK.
    Aug 13 '21 at 15:23
  • When you run apt-cache policy qgis, you should see 3.16.9 too. Otherwise, perhaps your qgis pubkey is expired, and the official qgis repo is not taken at all.
    – AndreJ
    Aug 13 '21 at 16:08
  • Running apt-cache policy qgis shows me the installed version 3.10, the candidate (3.16) and a version table. Now, when I run the install it only says 'qgis : Depends: qgis-common (= 1:3.16.9+28bionic-ubuntugis) but 3.10.12+dfsg-1~bionic1 is to be installed' but it still makes an error when I try to install qgis-common
    – OmteK.
    Aug 13 '21 at 16:39
  • What error do you get for qgis-common?
    – AndreJ
    Aug 13 '21 at 16:44

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.