sudo apt install qgis
installs 2.8 (on 16.04) or 2.18 (on 18.04), but I would like to install version 3 (especially the 3.10 ltr) so I've tried:
sudo add-apt-repository https://qgis.org/ubuntu-ltr
which works as at the bottom of /etc/apt/sources.list
there is:
deb https://qgis.org/ubuntu-ltr xenial main
# deb-src https://qgis.org/ubuntu-ltr xenial main
But this doesn't change what's installed - apparently that repository can't be used - I'm told by apt update:
Get:16 https://qgis.org/ubuntu-ltr buster InRelease [3,687 B]
rr:16 https://qgis.org/ubuntu-ltr buster InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 51F523511C7028C3
Reading package lists... Done
W: GPG error: https://qgis.org/ubuntu-ltr buster InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 51F523511C7028C3
E: The repository 'https://qgis.org/ubuntu-ltr buster InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
I'm also told:
N: See apt-secure(8) manpage for repository creation and user configuration details.
So apparently I need a key to securely acquire 3.10 from the ltr repository
Following the debian ubuntu instructions, I entered:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key
51F523511C7028C3
and while that stopped update complaints, I still can't install qgis because it complains about broken packages.
Set up a 16.04 image and did sudo apt update
then upgrade
then and autoremove
.
Following the suggestion from Eric Gagné, I added the update
command as well.
I tried 3 different of these
First
By just adding update
:
$ sudo add-apt-repository https://qgis.org/ubuntu-ltr
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 51F523511C7028C3
$ sudo apt update
$ sudo apt install qgis
$ qgis &
It runs but it's version 2.18.
Second
I added $ sudo apt upgrade
after the update
command.
It runs but it's also version 2.18.
Third
I changed to remove the ltr
so as to try to get 3.12
$ sudo add-apt-repository https://qgis.org/ubuntu
I didn't use $ sudo apt upgrade
this time.
It runs but it's version 2.18.
So adding the extra update
lets it run - but I don't get version 3???
apt-get update
after adding the GPG key. And only then to actually install your software. explained here. If you still have error messages, please paste them by editing your post.sudo apt-cache policy qgis
? Did you also properly removed QGIS 2.18?