Install QGIS 3.x on Ubuntu 18.04

The ubuntugis ppa holds only LTR versions, currently QGIS 2.18.28, see https://launchpad.net/~ubuntugis/+archive/ubuntu/ubuntugis-unstable/?field.series_filter=bionic.

If you want QGIS 3.4, you can take the https://qgis.org/ubuntu/ repository without any ubuntugis dependencies. You might have to remove any packages you have from ubuntugis before installing.

https://qgis.org/ubuntugis/ has support for bionic as well, but faced some issues recently. The QGIS packages are built against GRASS 7.4.3, but the ubuntugis ppa has meanwhile switched to GRASS 7.6.0. So I don't suggest that at the moment.

The situation is different for Xenial, because the main ubuntu repo for that does not include GDAL 2, which is mandatory for QGIS 3.


UPDATE

Ubuntugis unstable now has QGIS 3.4.14 for bionic.


I had the same problem. What worked for me was mainly following this article, specifically:

1.Open /etc/apt/sources.list with

sudo nano /etc/apt/sources.list

2.If there is any mention of QGIS, delete that line. Then, copy there this line:

deb https://qgis.org/ubuntugis bionic main

3.Then, run this

sudo apt update && sudo apt-get install qgis python3-qgis qgis-plugin-grass

4.If it didn't work, go back to step 1 but instead of deb https://qgis.org/ubuntugis bionic main, try one of the following:

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