Skip to content

Commit 2d46784

Browse files
committed
update(article): prefer a proper translation by myself
1 parent 729d8a7 commit 2d46784

File tree

1 file changed

+113
-25
lines changed

1 file changed

+113
-25
lines changed

content/posts/2025-02-06_installing-QGIS-on-Ubuntu-with-apt.md

Lines changed: 113 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors:
66
categories:
77
- Article
88
comments: true
9-
date: 2025-02-06
9+
date: 2025-02-10
1010
description: Installing the most widely used open-source GIS software on the most popular Linux distribution should be straightforward, yet it often raises questions and even problems. This guide walks you through the process so you can refer back to it whenever needed.
1111
icon: fontawesome/brands/ubuntu
1212
image: https://cdn.geotribu.fr/img/articles-blog-rdp/articles/2023/qgis_installation_ubuntu/qgis_ubuntu_linux.png
@@ -25,14 +25,16 @@ tags:
2525

2626
It may sound surprising, but installing the most widely used open-source GIS software on the most popular Linux distribution is still not as seamless as it should be. Even experienced users sometimes struggle with repository configurations, package dependencies, authentication keys and other system administration intricacies.
2727

28-
![Geographer taming a penguin](https://cdn.geotribu.fr/img/articles-blog-rdp/articles/2023/qgis_installation_ubuntu/geographe_contre_linux_dall-e.webp "Geographer taming a penguin - Credits: DALL·E"){: .img-center loading=lazy }
28+
![Geographer taming a penguin](https://cdn.geotribu.fr/img/articles-blog-rdp/articles/2023/qgis_installation_ubuntu/geographe_contre_linux_dall-e.webp "Geographer taming a penguin - Credits: DALL·E 1"){: .img-center loading=lazy }
2929

30-
The challenge isn't just technical. QGIS's official installation documentation, while thorough, can be difficult to navigate for those who aren't developers or seasoned Linux users. Plus, regular updates and changes in the software lifecycle can introduce unexpected hurdles for everyday users.
30+
The challenge isn't just technical. [QGIS's official installation documentation](https://qgis.org/resources/installation-guide/#debian--ubuntu), while thorough, can be difficult to navigate for those who aren't developers or seasoned Linux users. Plus, regular updates and changes in the software lifecycle can introduce unexpected hurdles for everyday users.
3131

32-
That said, there's no point in complaining, it’s free software and open-source contributors deserve appreciation, not frustration! Since I don't install or reinstall QGIS every day, I've put together this guide as a personal reference and to help others.
32+
That said, there's no point in complaining, it’s free software and open-source contributors deserve appreciation, not frustration! And I speak from experience. :wink:
3333

3434
<!-- more -->
3535

36+
Since I don't install or reinstall QGIS every day, I've put together this guide as a personal reference and to help others. Given that this is a constantly evolving topic, I’ll try to keep this guide updated from time to time. However, feel free to [report issues](https://github.com/geotribu/english-blog/issues) or [suggest improvements](https://contribuer.geotribu.fr/edit/fix_content_from_website/).
37+
3638
[Leave a comment :fontawesome-solid-comments:](#__comments "Go to comments"){: .md-button }
3739
{: align=middle }
3840

@@ -41,42 +43,38 @@ That said, there's no point in complaining, it’s free software and open-source
4143
## Prerequisites
4244

4345
- administrator privileges on your system
44-
- an internet connection that allows access to <https://qgis.org/> and can handle a 1.5GB download
46+
- an internet connection that allows access to <https://qgis.org/> and can handle a 1.5GB download without choking
4547

4648
----
4749

4850
## Choosing the right version
4951

5052
Before installing, you need to decide: which version of QGIS do you want?
5153

52-
Personally, I prefer installing **QGIS LTR (Long Term Release)** (version 3.34.15 at the time of writing) on **Ubuntu LTS (Long Term Support)** (24.04.1 at the time of writing) using **the official QGIS package repository**.
54+
Personally, I prefer opting for **QGIS LTR (Long Term Release)** (version 3.34.15 at the time of writing) on **Ubuntu LTS (Long Term Support)** (24.04.1 at the time of writing) using **the official QGIS package repository**.
5355

5456
Yes, I value stability.
5557
Yes, the [`ubuntugis-unstable`](https://wiki.ubuntu.com/UbuntuGIS) repository lives up to its name.
56-
No, non-LTR versions aren’t stable enough, especially before they reach at least six patch releases.
57-
<!-- more -->
58+
No, non-LTR versions aren’t stable enough, especially before they reach at least six bugfix releases (the last digit in the version number).
5859

59-
[Leave a comment :fontawesome-solid-comments:](#__comments "Go to comments"){: .md-button }
60-
{: align=middle }
61-
62-
Sure, I don’t get the latest flashy features making the rounds on GIS news sites. My versions of GDAL and PROJ might be older than my kid, but my setup just works(tm).
60+
Sure, I don’t get the latest buzzworthy features making the rounds on GIS news sites (like Geotribu). My versions of GDAL and PROJ might be older than my kids… but my setup works™. :sunglasses:
6361
And I can focus on my work without worrying about the next update breaking something. :person_in_lotus_position:
6462

6563
![People installing non-LTR QGIS](https://media.giphy.com/media/nneVpy2YnHZNm/giphy.gif){: .img-center loading=lazy }
6664

6765
> :person_juggling: Those who install non-LTR QGIS without patch releases :person_juggling:
6866
{: align=middle }
6967

70-
!!! note "Version Availability"
71-
The version of your Ubuntu distribution matters. Not all QGIS versions are packaged for all Ubuntu versions due to dependency constraints. For example, on Ubuntu 20.04, you won’t find QGIS versions beyond 3.22.
68+
!!! note "Versions availability"
69+
The version of your Ubuntu distribution matters. Not all QGIS versions are packaged for all Ubuntu versions due to dependency constraints. For example, on [Ubuntu 20.04](https://ubuntu.qgis.org/ubuntu-ltr/dists/focal/main/binary-amd64/Packages), you won’t find QGIS versions beyond 3.22.
7270

7371
----
7472

7573
## Installing dependencies
7674

77-
First, ensure your system is up to date and install essential packages:
75+
First, ensure your system is up to date. Here, we're assuming you’re starting from a fresh system. If your machine is cluttered with old setups, consider [cleaning it up](#cleanup) before proceeding.
7876

79-
```sh
77+
```sh title="Update your package lists and install the required tools"
8078
sudo apt update
8179
sudo apt install ca-certificates gnupg lsb-release software-properties-common
8280
```
@@ -87,37 +85,128 @@ sudo apt install ca-certificates gnupg lsb-release software-properties-common
8785

8886
The QGIS project maintains an official packages repository (PPA) for Debian-based distributions, including Ubuntu. To use it, we need to authenticate and configure it properly.
8987

90-
### Authentication key
88+
### Authenticating the repository
9189

9290
To install anything from this repository, you need to be able to authenticate it to the system.
9391

9492
We start by downloading the PPA's authentication key and storing it in the appropriate system directory:
9593

96-
```sh
94+
```sh title="Download and store the QGIS PPA authentication key"
9795
sudo mkdir -p /etc/apt/keyrings
9896
sudo wget -O /etc/apt/keyrings/qgis-archive-keyring.gpg https://download.qgis.org/downloads/qgis-archive-keyring.gpg
9997
```
10098

101-
### Adding the repository
99+
### Adding the repository to our list of packages sources
102100

103-
Now, we add the QGIS repository to our package sources by creating a file in `/etc/apt/sources.list.d/`.
101+
Now, we add the QGIS repository to our package sources by creating a dedicated file in `/etc/apt/sources.list.d/`:
104102

105103
<!-- markdownlint-disable MD046 -->
106-
=== "QGIS LTR"
104+
=== ":person_in_lotus_position: QGIS LTR"
107105

108106
```sh
109107
echo \
110108
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/qgis-archive-keyring.gpg] https://qgis.org/ubuntu-ltr \
111109
$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/qgis.list > /dev/null
112110
```
113111

114-
=== "Latest QGIS Release"
112+
Then, verify that the file was successfully written:
113+
114+
```sh
115+
less -F /etc/apt/sources.list.d/qgis.list
116+
```
117+
118+
Result on Ubuntu 24.04 should be:
119+
120+
```debsources title="/etc/apt/sources.list.d/qgis.list"
121+
deb [arch=amd64 signed-by=/etc/apt/keyrings/qgis-archive-keyring.gpg] https://qgis.org/ubuntu-ltr noble main
122+
```
123+
124+
=== ":person_juggling: QGIS latest release"
115125

116126
```sh
117127
echo \
118128
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/qgis-archive-keyring.gpg] https://qgis.org/ubuntu \
119129
$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/qgis.list > /dev/null
120130
```
131+
132+
Then, verify that the file was successfully written:
133+
134+
```sh
135+
less -F /etc/apt/sources.list.d/qgis.list
136+
```
137+
138+
Result on Ubuntu 24.04 should be:
139+
140+
```debsources title="/etc/apt/sources.list.d/qgis.list"
141+
deb [arch=amd64 signed-by=/etc/apt/keyrings/qgis-archive-keyring.gpg] https://qgis.org/ubuntu noble main
142+
```
143+
144+
<!-- markdownlint-enable MD046 -->
145+
146+
#### Alternatively: the `qgis.sources` file
147+
148+
There is another way of referencing the repository in the list of sources: [the DEB822 format](https://repolib.readthedocs.io/en/latest/deb822-format.html), which aims to solve issues related to the historical one-liner. Well, don't mind, the information stored is the same, but not structured in the same way. Let's say it's the new way to format packages source files.
149+
150+
In this case, the repository is referenced in a `/etc/apt/sources.list.d/qgis.sources` file:
151+
152+
<!-- markdownlint-disable MD046 -->
153+
=== ":person_in_lotus_position: QGIS LTR"
154+
155+
```sh
156+
echo \
157+
"Types: deb deb-src
158+
URIs: https://qgis.org/ubuntu-ltr
159+
Suites: $(lsb_release -cs)
160+
Architectures: amd64
161+
Components: main
162+
Signed-By: /etc/apt/keyrings/qgis-archive-keyring.gpg" | sudo tee /etc/apt/sources.list.d/qgis.sources > /dev/null
163+
```
164+
165+
Then, verify that the file was successfully written:
166+
167+
```sh
168+
less -F /etc/apt/sources.list.d/qgis.sources
169+
```
170+
171+
Result on Ubuntu 24.04 should be:
172+
173+
```yaml title="/etc/apt/sources.list.d/qgis.sources"
174+
Types: deb deb-src
175+
URIs: https://qgis.org/ubuntu-ltr
176+
Suites: noble
177+
Architectures: amd64
178+
Components: main
179+
Signed-By: /etc/apt/keyrings/qgis-archive-keyring.gpg
180+
```
181+
182+
=== ":person_juggling: QGIS latest release"
183+
184+
```sh
185+
echo \
186+
"Types: deb deb-src
187+
URIs: https://qgis.org/ubuntu
188+
Suites: $(lsb_release -cs)
189+
Architectures: amd64
190+
Components: main
191+
Signed-By: /etc/apt/keyrings/qgis-archive-keyring.gpg" | sudo tee /etc/apt/sources.list.d/qgis.sources > /dev/null
192+
```
193+
194+
Then, verify that the file was successfully written:
195+
196+
```sh
197+
less -F /etc/apt/sources.list.d/qgis.sources
198+
```
199+
200+
Result on Ubuntu 24.04 should be:
201+
202+
```yaml title="/etc/apt/sources.list.d/qgis.sources"
203+
Types: deb deb-src
204+
URIs: https://qgis.org/ubuntu
205+
Suites: noble
206+
Architectures: amd64
207+
Components: main
208+
Signed-By: /etc/apt/keyrings/qgis-archive-keyring.gpg
209+
```
121210
<!-- markdownlint-enable MD046 -->
122211

123212
----
@@ -126,8 +215,7 @@ Now, we add the QGIS repository to our package sources by creating a file in `/e
126215

127216
![QGIS logo](https://cdn.geotribu.fr/img/logos-icones/logiciels_librairies/qgis.png "QGIS logo"){: .img-thumbnail-left }
128217

129-
With everything set up, we can now install QGIS.
130-
218+
With everything set up, we can now install QGIS!
131219
First, update your package list:
132220

133221
```sh
@@ -158,7 +246,7 @@ sudo apt install qgis
158246

159247
----
160248

161-
## Cleaning up
249+
## Cleaning up { #cleanup }
162250

163251
If things go wrong, perhaps due to a botched upgrade or conflicting repositories, you may need to clean up your system before retrying.
164252

0 commit comments

Comments
 (0)