在Ubuntu上安装QGIS3.26.x布宜诺斯艾利斯​

disho6za  于 2022-10-05  发布在  其他
关注(0)|答案(1)|浏览(161)

I try to install QGIS on Ubuntu following the tutorial of the website. https://www.qgis.org/en/site/forusers/alldownloads.html

At the moment of installing QGIS itself, the following command is used:

sudo apt install qgis qgis-plugin-grass

Then an error message appear:

Err:1 https://qgis.org/ubuntu jammy/main amd64 qgis amd64 1:3.26.1+36jammy
  404  Not Found [IP: 144.76.174.102 443]
Err:2 https://qgis.org/ubuntu jammy/main amd64 qgis-plugin-grass amd64 1:3.26.1+36jammy
  404  Not Found [IP: 144.76.174.102 443]
E: Failed to fetch https://ubuntu.qgis.org/ubuntu/pool/main/q/qgis/qgis_3.26.1+36jammy_amd64.deb  404  Not Found [IP: 144.76.174.102 443]
E: Failed to fetch https://ubuntu.qgis.org/ubuntu/pool/main/q/qgis/qgis-plugin-grass_3.26.1+36jammy_amd64.deb  404  Not Found [IP: 144.76.174.102 443]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

It seems that there are simply no QGIS distribution to reach with this command. Would anyone has a working method to install QGIS on Ubuntu?

elcex8rz

elcex8rz1#

Here is how I did it:


# fetch the signing key

sudo mkdir -m755 -p /etc/apt/keyrings  # not needed since apt version 2.4.0 like Debian 12 and Ubuntu 22 or newer
sudo wget -O /etc/apt/keyrings/qgis-archive-keyring.gpg https://download.qgis.org/downloads/qgis-archive-keyring.gpg

# remove all references to qgis from all files in (or below) /etc/apt/

cd /etc/apt/
sed -i 'd/qgis/'**/*.list
cat > sources.list.d/qgis.sources << EOF
Types: deb deb-src
URIs: https://qgis.org/debian
Suites: focal
Architectures: amd64
Components: main
Signed-By: /etc/apt/keyrings/qgis-archive-keyring.gpg
EOF

sudo apt update
sudo apt install qgis qgis-plugin-grass

I'm still on 20.04 so I used focal you'll need to change that to what ever your system reports with lsb_release -c

相关问题