[GIS] Installing latest version of QGIS on Ubuntu 18.04

qgisUbuntu

I'n not an experienced user of Linux. But I just wanted to install the latest version of GRASS GIS and QGIS on Ubuntu 18.04. There are many different ways to do this I guess. There are the ppa's, there are the normal qgis-repositories for ubuntu and than there is also ubuntugis. It's all a little bit overwhelming and in the process of installing QGIS I think I messed some things up.

When I run sudo nano /etc/apt/sources.list I added these two repositories:

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

Then I do all the steps provided here:

https://qgis.org/en/site/forusers/alldownloads.html#debian-ubuntu

But when I run sudo apt install qgis I get:

The following packages have unmet dependencies:
 qgis : Depends: gdal-abi-2-2-3 but it is not installable
        Depends: libqgis-analysis3.10.2 but it is not going to be installed
        Depends: libqgis-app3.10.2 but it is not going to be installed
        Depends: libqgis-core3.10.2 but it is not going to be installed
        Depends: libqgis-gui3.10.2 but it is not going to be installed
        Depends: python3-qgis (= 1:3.10.2+28bionic) but it is not going to be installed
        Depends: qgis-providers (= 1:3.10.2+28bionic) 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.

I don't know if this has anything to do with the one time I tried to add the ppa. When I run ls /etc/apt/sources.list.d/, I get:

...
ubuntugis-ubuntu-ppa-bionic.list
ubuntugis-ubuntu-ppa-bionic.list.save
ubuntugis-ubuntu-ubuntugis-unstable-bionic.list
ubuntugis-ubuntu-ubuntugis-unstable-bionic.list.save

I just wanted to have the newest version of QGIS and GRASS (due to Python3) and now I don't know how to get back. Does anyone have a pointer?

Best Answer

You have to decide if you want to go the ubuntugis way, or not.

If you don't want ubuntugis, comment out all references to that ppa. You will get GDAL 2.2.3, GRASS 7.4 and QGIS 3.10.2

If you take ubuntugis, you get GDAL 3.0.2, GRASS 7.8 and QGIS 3.10.2.

The error message Depends: gdal-abi-2-2-3 but it is not installable indicates that you request or have a wrong GDAL version. Maybe you already have a newer one from ubuntugis, which blocks the non-ubuntugis QGIS package.

And the final commannd line should be:

sudo apt-get update
sudo apt-get install qgis qgis-plugin-grass python3-qgis
Related Question