QGIS安装说明

如何获取QGIS?

QGIS可以在 Windows、macOS、Linux、Android 和 iOS 平台上运行。

我们建议安装已发布的软件包。

为了评估即将发布的版本并允许非开发人员支持开发,我们还提供了测试包 (请注意 警告)。

在发布之前的功能冻结阶段 (请参见 发布时间表) 这些包实际上是 预发行版,我们非常希望用户能进行测试

Windows

在Windows上安装有两种选项:

独立安装程序

对于初学者,最简单的方法是使用独立安装程序:

发行版

版本

软件包

最新发行版

3.28.3 Firenze ​

Installer Checksum

长期发行版

3.22.15 Białowieża LTR

Installer Checksum

开发版

3.29 master

Weekly snapshots

另请参阅 主安装程序页面

The weekly snapshots of the nightly qgis-dev package of OSGeo4W are for users that cannot use OSGeo4W (see below) for some reason or just prefer standalone installers. In the feature freeze phase that also acts as release candidate.

OSGeo4W安装程序

More advanced QGIS users should use OSGeo4W packages, which for one make it possible to install several versions in parallel and also to do much more efficient updates as only changed components are downloaded and installed.

The OSGeo4W repository contains a lot of software from OSGeo projects. QGIS and all dependencies are included, along with Python, GRASS, GDAL, etc. The installer is able to install from internet or just download all needed packages beforehand. The downloaded files are kept in a local directory for future installations and could also be used to install offline.

Steps are:

  • 下载 OSGeo4W安装程序 然后开始安装

  • Choose Express Install and select QGIS to install the latest release and/or QGIS LTR to install the long term release.

Alternatively to Express you also use the Advanced Install, navigate to the Desktop section and pick one or more of the following packages:

发行版

版本

软件包

描述说明

最新发行版

3.28.3 Firenze ​

qgis

发行版

qgis-rel-dev 1

最新发行版的每日构建版

长期发行版

3.22.15 Białowieża LTR

qgis-ltr

发行版

qgis-ltr-dev 1

Nightly build of the upcoming long term point release

开发版

3.29 master

qgis-dev 1

开发版的每日构建版

1(1,2,3)

每日构建版是调试版本 (包括调试输出)

The packages listed in the table only install the necessary packages to run QGIS. Corresponding to those packages there are also meta packages with the postfix -full-free and -full. The former contains additional optional dependencies that some popular - not included - plugins use and the latter include the former and also add proprietary extensions like Oracle, ECW and MrSID.

The Express installs reference the corresponding -full variant and the standalone installers are also made from these OSGeo4W package sets.

在安装任何每日构建版之前,请注意 警告信息

Linux

多数Linux发行版将QGIS分为几个软件包,您可能需要 qgis 和 qgis python (用于运行插件)。qgis grass (或qgis-plugin-grass)、qgis-server 等软件包最初安装时可以跳过,或者仅在需要时安装。

Below you find instructions to install per distribution. For most distro's there are instructions to install QGIS stable and instructions to install a cutting edge QGIS testing build (note the warning).

Debian 或 Ubuntu

快速入门

Note

In the section following this one, you will find ALL possible options to install different versions of QGIS in different versions of Debian/Ubuntu. If you have problems, verify there whether your distribution is still supported as the repositories also contain older unsupported distributions with the last QGIS version that was supported. Beware that those might have meanwhile ceased to work.

在此,您只需在 Debian 或 Ubuntu 中安装最新稳定版 QGIS (3.28.x Firenze),而无需编辑配置文件。

Note

虽然您在某些地方看到 'Debian',但这也适用于 'Ubuntu',因为其中一个实际是我们服务器中另一个的符号链接。

首先安装为此指令所需的几个工具:

sudo apt install gnupg software-properties-common

现在安装QGIS签名密钥,以便信任并安装QGIS资源库中的软件:

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

Add the QGIS repo for the latest stable QGIS (3.28.x Firenze) to /etc/apt/sources.list.d/qgis.sources:

Types: deb deb-src
URIs: https://qgis.org/debian
Suites: your-distributions-codename
Architectures: amd64
Components: main
Signed-By: /etc/apt/keyrings/qgis-archive-keyring.gpg

Note

Suites in above lines depends on your distribution. lsb_release -cs will show your distribution name.

In some distributions (like Linux Mint), . /etc/os-release; echo "$UBUNTU_CODENAME" will show the correct distibution name.

See Available codenames.

更新资源库信息,映出刚刚添加的QGIS信息:

sudo apt update

现在,开始安装QGIS:

sudo apt install qgis qgis-plugin-grass

Note

Add qgis-server to this line if you also want to install QGIS Server

资源库

默认的 Debian 和 Ubuntu 软件资源库通常包含QGIS的旧版本。

To have newer versions, you have to add alternative software repositories, by adding one of the deb-lines below to your /etc/apt/sources.list.d/qgis.sources file.

我们的主资源库根据各个发行版提供的依赖关系,包含多个 Debian 和 Ubuntu 版本的软件包。

For Ubuntu we also used to have extra packages in a separate repository that are based on ubuntugis, which held more uptodate versions of other GIS packages than Ubuntu itself for LTS versions. If you want those you also need to include ubuntugis-unstable ppa in your /etc/apt/sources.list.d/qgis.list file (see ubuntugis documentation).

Note

发行版软件包仅在新版本发布不久后生成一次。由于不稳定,尚未发布的Debian版 (测试) 和UbuntuGIS不稳定版可能会更改库。当Debian、Ubuntu或UbuntuGIS不稳定版中的开发继续进行,并且QGIS中用作依赖项的软件包发生变化时,原有软件包可能迟早会被这些目标终止。这种情况下,您可以:

  • 移至稳定的Debian版本并使用已发布的软件包;

  • 等待下一版 (预期 2023-03-03 12:00:00 UTC ) 发布,每月都会发布并包含更新后的依赖项;

  • 切换到测试资源库 (可用于 两个 发布分支和主资源库),软件包将定期重新构建,并将自动获取更新的依赖项;

  • 构建您自己的软件包 (请参阅 build-debian-packages)。

软件包说明:

发行版

版本

描述说明

资源库

最新发行版

3.28.x Firenze ​

Debian 和 Ubuntu 版本

https://qgis.org/debian https://qgis.org/ubuntu

使用UbuntuGIS不稳定版依赖项发布

https://qgis.org/ubuntugis

即将发布的Debian和Ubuntu的每日构建版 5

https://qgis.org/debian-nightly-release https://qgis.org/ubuntu-nightly-release

即将发布的UbuntuGIS不稳定版依赖项的每日构建版 5

https://qgis.org/ubuntugis-nightly-release

长期发行版资源库

3.22.x Białowieża LTR

Debian 和 Ubuntu 版本

https://qgis.org/debian-ltr https://qgis.org/ubuntu-ltr

使用UbuntuGIS不稳定版依赖项发布

https://qgis.org/ubuntugis-ltr

即将发布的Debian和Ubuntu的每日构建版 5

https://qgis.org/debian-nightly-ltr https://qgis.org/ubuntu-nightly-ltr

即将发布的UbuntuGIS不稳定版依赖项的每日构建版 5

https://qgis.org/ubuntugis-nightly-ltr

开发版

3.29 master

Debian 和 Ubuntu 的每日构建版 5

https://qgis.org/debian-nightly https://qgis.org/ubuntu-nightly

UbuntuGIS不稳定版依赖项的每日构建版 5

https://qgis.org/ubuntugis-nightly

5(1,2,3,4,5,6)

每日构建版是调试版本 (包括调试输出)

下一版发布时间点: 2023-03-03 12:00:00 UTC
下一发行版: 2023-03-03 12:00:00 UTC
(更多日期请参见发布计划 路线图)

支持的发行版:

分布

版本

开发代码名

基于UbuntuGIS不稳定版依赖项是否可用?

Debian

11.x (stable)

bullseye

unstable

sid

Ubuntu

23.04

lunar 6

22.10

kinetic

22.04 (LTS)

jammy

20.04 (LTS)

focal 7

6

only nightlies builds

7

only up to QGIS 3.26 (Qt 5.13 required for 3.27)

To use the qgis archive you have to first add the archive's repository public key:

wget https://download.qgis.org/downloads/qgis-archive-keyring.gpg
gpg --no-default-keyring --keyring ./qgis-archive-keyring.gpg --list-keys

应输出:

./qgis-archive-keyring.gpg
--------------------------
pub   rsa4096 2022-08-08 [SCEA] [expires: 2027-08-08]
      2D7E3441A707FDB3E7059441D155B8E6A419C5BE
uid           [ unknown] QGIS Archive Automatic Signing Key (2022-2027) <qgis-developer@lists.osgeo.org>

After you have verified the output you can install the key with:

sudo mkdir -m755 -p /etc/apt/keyrings  # not needed since apt version 2.4.0 like Debian 12 and Ubuntu 22 or newer
sudo cp qgis-archive-keyring.gpg /etc/apt/keyrings/qgis-archive-keyring.gpg

Alternatively you can download the key directly without manual verification:

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

With the keyring in place you can add the repository as /etc/apt/sources.list.d/qgis.sources with following content:

Types: deb deb-src
URIs: *repository*
Suites: *codename*
Architectures: amd64
Components: main
Signed-By: /etc/apt/keyrings/qgis-archive-keyring.gpg

Example for the latest long term release for Ubuntu 22.04 Jammy:

Types: deb deb-src
URIs: https://qgis.org/ubuntu-ltr
Suites: jammy
Architectures: amd64
Components: main
Signed-By: /etc/apt/keyrings/qgis-archive-keyring.gpg

然后输入以下命令安装QGIS:

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

如果要安装QGIS服务器,请输入:

sudo apt update
sudo apt install qgis-server --no-install-recommends --no-install-suggests
# if you want to install server Python plugins
apt install python-qgis

Note

在进行更新之前,请移除您可能已经从其他资源库安装的所有QGIS和GRASS软件包。

Fedora

Get packages for any Fedora by typing:

sudo dnf install qgis python3-qgis qgis-grass qgis-server

Default Fedora software repositories often hold older versions of QGIS.

To have newer versions or the latest LTR, you have to add alternative software repositories based on the version you want to install (stable, LTR or testing).

QGIS 稳定版

启用资源库:

sudo dnf copr enable dani/qgis

然后输入以下命令安装QGIS:

sudo dnf install qgis python3-qgis qgis-grass

In case you would like to install QGIS Server (note that it's not a common practice to install both client and server applications on the same machine), type:

sudo dnf install qgis-server python3-qgis

分布

版本

QGIS版本

GRASS GIS 版本

Fedora

35

3.24

7.8

36

3.26

8.0

更多信息请访问 https://copr.fedorainfracloud.org/coprs/dani/qgis/

QGIS LTR (长期发行版)

启用资源库:

sudo dnf copr enable dani/qgis-ltr

然后输入以下命令安装QGIS:

sudo dnf install qgis python3-qgis qgis-grass

In case you would like to install QGIS Server (note that it's not a common practice to install both client and server applications on the same machine), type:

sudo dnf install qgis-server python3-qgis

分布

版本

QGIS版本

GRASS GIS 版本

Fedora

35

3.22

7.8

36

3.22

8.0

更多信息请访问 https://copr.fedorainfracloud.org/coprs/dani/qgis-ltr/

SUSE / openSUSE

以下资源库中提供了qgis和qgis-ltr的最新稳定版和LTR安装包:

分布

资源库

Tumbleweed

https://download.opensuse.org/repositories/Application:/Geo/openSUSE_Tumbleweed/

Leap 15.2

https://download.opensuse.org/repositories/Application:/Geo/openSUSE_Leap_15.2/

Leap 15.1

https://download.opensuse.org/repositories/Application:/Geo/openSUSE_Leap_15.1/

Factory ARM

https://download.opensuse.org/repositories/Application:/Geo/openSUSE_Factory_ARM/

Factory PowerPC

https://download.opensuse.org/repositories/Application:/Geo/openSUSE_Factory_PowerPC/

SLE 15 SP1 Backports

https://download.opensuse.org/repositories/Application:/Geo/SLE_15_SP1_Backports/

SLE 15 SP1 Backports debug

https://download.opensuse.org/repositories/Application:/Geo/SLE_15_SP1_Backports_debug/

所有软件包都受GRASS和Python支持。

可在此处找到所有 openSUSE Geo 资源库: https://download.opensuse.org/repositories/Application:/Geo/

Mandriva

QGIS 稳定版

当前:

urpmi qgis-python qgis-grass

Slackware

QGIS 稳定版

https://slackbuilds.org/result/?search=qgis 中的安装程序

Arch Linux

QGIS 稳定版

Arch Linux 在官方资源库中提供:https://www.archlinux.org/packages/community/x86_64/qgis/

安装方式:

pacman -S qgis

QGIS LTR

QGIS Long Term Release is available in AUR (Arch User Repository).

Install with yaourt or other package manager which support AUR:

yaourt -S qgis-ltr

For bugs and other behaviour, read comments here : https://aur.archlinux.org/packages/qgis-ltr/

QGIS 测试版

QGIS testing is available in AUR (Arch User Repository).

Install with yaourt or other package manager which support AUR:

yaourt -S qgis-git

For bugs and other behaviour, read comments here : https://aur.archlinux.org/packages/qgis-git

Flatpak

There is an QGIS flatpak for QGIS Stable available, maintained by the flathub community.

For general Linux Flatpak install notes, see https://flatpak.org/setup/

QGIS on Flathub: https://flathub.org/apps/details/org.qgis.qgis

To install:

flatpak install --from https://dl.flathub.org/repo/appstream/org.qgis.qgis.flatpakref

Then to run:

flatpak run org.qgis.qgis

To update your flatpak QGIS:

flatpak update

On certain distributions, you may also need to install xdg-desktop-portal or xdg-desktop-portal-gtk packages in order for file dialogs to appear.

Flathub files: https://github.com/flathub/org.qgis.qgis and report issues here: https://github.com/flathub/org.qgis.qgis/issues

Note: if you need to install additional Python modules, because they are needed by a plugin, you can install the module with (here installing the scipy module):

flatpak run --devel --command=pip3 org.qgis.qgis install scipy --user

Mac OS X / macOS

Official All-in-one, signed installers for macOS High Sierra (10.13) and newer can be downloaded from the QGIS download page.

Alternative builds supporting macOS High Sierra (10.13) and newer are available from kyngchaos.com

QGIS夜间版本

A nightly updated standalone installer from QGIS master can be downloaded from here.

旧版本

Previous releases of the official installer can be downloaded from https://qgis.org/downloads/macos/.

Previous releases of the kyngchaos installer can be downloaded from https://www.kyngchaos.com/software/archive/. The oldest installers support macOS 10.4 Tiger.

FreeBSD

QGIS 稳定版

To install QGIS from binary packages type

pkg install qgis

Or to customize compilation options, you can build it from FreeBSD ports

cd /usr/ports/graphics/qgis
make install clean

QGIS LTR

To install QGIS from binary packages type

pkg install qgis-ltr

Or to customize compilation options, you can build it from FreeBSD ports

cd /usr/ports/graphics/qgis-ltr
make install clean

Android

An old and deprecated not touch optimised release of QGIS for Android can be found on the google play store.

https://play.google.com/store/apps/details?id=org.qgis.qgis

Warning

There is currently no support for Android 5. Best support is given for Android 4.3 and 4.4.x. This is a direct port of the QGIS desktop application. It is only slightly optimized for touch devices and therefore needs to be carefully evaluated for its suitability in day-to-day use. There are other apps available which are designed and optimized specifically for touch devices.

QGIS测试警告

Warning

QGIS testing packages are provided for some platforms in addition to the QGIS stable version. QGIS testing contains unreleased software that is currently being worked on. They are only provided for testing purposes to early adopters to check if bugs have been resolved and that no new bugs have been introduced. Although we carefully try to avoid breakages, it may at any given time not work, or may do bad things to your data. Take care. You have been warned!

从源代码安装

Refer to INSTALL on how to build and install QGIS from source for the different platforms.