QGISをインストールする!(Ubuntu Desktop 22.04)

Ubuntu Desktop 22.04にQGISをインストールします。

実行環境を確認する!

実行環境を確認します。

$ hostnamectl
 Static hostname: vmsubu03-loc-lab4ict-com
 Pretty hostname: vmsubu03.loc.lab4ict.com
       Icon name: computer-vm
         Chassis: vm
      Machine ID: 112e02b1c1d048dc890533d8ef15a212
         Boot ID: d64e47cd181f47329f4d9a42f49cb5d3
  Virtualization: oracle
Operating System: Ubuntu 22.04.3 LTS              
          Kernel: Linux 6.2.0-32-generic
    Architecture: x86-64
 Hardware Vendor: innotek GmbH
  Hardware Model: VirtualBox

QGISのリポジトリを登録する!

前提パッケージとなるgnupg、software-properties-commonをインストールします。Ubuntu Desktop 22.04には、インストール済みでした。

$ sudo apt install gnupg software-properties-common
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
gnupg is already the newest version (2.2.27-3ubuntu2.1).
software-properties-common is already the newest version (0.99.22.7).
0 upgraded, 0 newly installed, 0 to remove and 16 not upgraded.

QGIS 署名キーをインストールします。

$ sudo wget -O /etc/apt/keyrings/qgis-archive-keyring.gpg https://download.qgis.org/downloads/qgis-archive-keyring.gpg
--2023-09-17 08:43:39--  https://download.qgis.org/downloads/qgis-archive-keyring.gpg
Resolving download.qgis.org (download.qgis.org)... 104.21.71.41, 172.67.143.23, 2606:4700:3035::6815:4729, ...
Connecting to download.qgis.org (download.qgis.org)|104.21.71.41|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1969 (1.9K)
Saving to: ‘/etc/apt/keyrings/qgis-archive-keyring.gpg’

/etc/apt/keyrings/qgis-archiv 100%[=================================================>]   1.92K  --.-KB/s    in 0s      

2023-09-17 08:43:40 (26.1 MB/s) - ‘/etc/apt/keyrings/qgis-archive-keyring.gpg’ saved [1969/1969]

QGISのリポジトリを登録します。

sudo cat <<EOF | sudo tee /etc/apt/sources.list.d/qgis.sources
Types: deb deb-src
URIs: https://qgis.org/ubuntu
Suites: jammy
Architectures: amd64
Components: main
Signed-By: /etc/apt/keyrings/qgis-archive-keyring.gpg
EOF

QGISをインストールする!

リポジトリの情報を更新します。

$ sudo apt update
Hit:1 http://jp.archive.ubuntu.com/ubuntu jammy InRelease                                                              
Get:2 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]                                              
Get:3 http://jp.archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]     
Get:4 https://ubuntu.qgis.org/ubuntu jammy InRelease [2,718 B]                            
Get:5 https://ubuntu.qgis.org/ubuntu jammy/main Sources [1,490 B]
Get:6 https://ubuntu.qgis.org/ubuntu jammy/main amd64 Packages [23.3 kB]
Fetched 257 kB in 3s (75.7 kB/s)    
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
11 packages can be upgraded. Run 'apt list --upgradable' to see them.

QGISのリポジトリを使用して、QGISをインストールします。

$ sudo apt install qgis qgis-plugin-grass
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-5.19.0-41-generic linux-hwe-5.19-headers-5.19.0-41 linux-image-5.19.0-41-generic
  linux-modules-5.19.0-41-generic linux-modules-extra-5.19.0-41-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  binutils binutils-common binutils-x86-64-linux-gnu blt fonts-lyx g++ g++-11 gcc gcc-11 gdal-bin gdal-data grass-core
  grass-doc javascript-common libaec0 libarmadillo10 libarpack2 libasan6 libassimp5 libbinutils libblosc1 libboost-dev
  libboost1.74-dev libc-dev-bin libc-devtools libc6-dev libcc1-0 libcfitsio9 libcharls2 libclang1-14 libcrypt-dev
  libctf-nobfd0 libctf0 libde265-0 libdraco4 libexpat1-dev libfcgi-bin libfcgi0ldbl libfftw3-double3 libfreexl1
  libfyba0 libgcc-11-dev libgdal30 libgeos-c1v5 libgeos3.10.2 libgeotiff5 libgsl27 libgslcblas0 libhdf4-0-alt
  libhdf5-103-1 libhdf5-cpp-103-1 libhdf5-hl-100 libheif1 libitm1 libjs-jquery libjs-jquery-ui libjs-leaflet
  libjs-sphinxdoc libjs-underscore libkmlbase1 libkmldom1 libkmlengine1 liblaszip8 liblbfgsb0 libllvm14 liblsan0
  libminizip1 libmng2 libmysqlclient21 libnetcdf19 libnsl-dev libodbc2 libodbcinst2 libogdi4.1 libopenblas-dev
  libopenblas-pthread-dev libopenblas0 libopenblas0-pthread libpdal-base13 libpdal-plugin-draco libpdal-plugin-e57
  libpdal-plugin-faux libpdal-plugin-hdf libpdal-plugin-i3s libpdal-plugin-icebridge libpdal-plugin-pgpointcloud
  libpdal-plugins libpdal-util13 libpq5 libproj22 libprotobuf-lite23 libpython3-dev libpython3.10-dev libqca-qt5-2
  libqca-qt5-2-plugins libqgis-3d3.32.2 libqgis-analysis3.32.2 libqgis-app3.32.2 libqgis-core3.32.2
  libqgis-customwidgets libqgis-gui3.32.2 libqgis-native3.32.2 libqgis-server3.32.2 libqgisgrass7-3.32.2
  libqgispython3.32.2 libqhull-r8.0 libqscintilla2-qt5-15 libqscintilla2-qt5-l10n libqt53danimation5 libqt53dcore5
  libqt53dextras5 libqt53dinput5 libqt53dlogic5 libqt53dquickscene2d5 libqt53drender5 libqt5charts5 libqt5concurrent5
  libqt5designer5 libqt5designercomponents5 libqt5help5 libqt5keychain1 libqt5location5 libqt5multimedia5
  libqt5multimediawidgets5 libqt5opengl5 libqt5pdf5 libqt5positioning5 libqt5positioningquick5 libqt5printsupport5
  libqt5qml5 libqt5qmlmodels5 libqt5quick5 libqt5quickwidgets5 libqt5sensors5 libqt5serialport5 libqt5sql5
  libqt5sql5-sqlite libqt5svg5 libqt5test5 libqt5webchannel5 libqt5webkit5 libqt5xml5 libqwt-qt5-6 librttopo1
  libspatialindex6 libspatialite7 libsqlite3-mod-spatialite libstdc++-11-dev libsuperlu5 libsz2 libtirpc-dev libtk8.6
  libtsan0 libubsan1 liburiparser1 libxerces-c3.2 libxsimd-dev libzip4 linux-libc-dev manpages-dev mysql-common
  proj-bin proj-data python-babel-localedata python-matplotlib-data python3-appdirs python3-attr python3-babel
  python3-beniget python3-brotli python3-bs4 python3-cycler python3-decorator python3-dev python3-distutils
  python3-fonttools python3-fs python3-gast python3-gdal python3-html5lib python3-ipython-genutils python3-jinja2
  python3-jsonschema python3-jupyter-core python3-kiwisolver python3-lxml python3-lz4 python3-matplotlib
  python3-mpmath python3-nbformat python3-numpy python3-owslib python3-packaging python3-pbr python3-pil.imagetk
  python3-plotly python3-ply python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci
  python3-pyqt5.qtmultimedia python3-pyqt5.qtpositioning python3-pyqt5.qtsql python3-pyqt5.qtsvg
  python3-pyqt5.qtwebkit python3-pyqt5.sip python3-pyrsistent python3-pythran python3-qgis python3-qgis-common
  python3-scipy python3-setuptools python3-sip python3-soupsieve python3-sympy python3-tenacity python3-tk
  python3-traitlets python3-ufolib2 python3-unicodedata2 python3-webencodings python3.10-dev qdoc-qt5 qgis-common
  qgis-plugin-grass-common qgis-provider-grass qgis-providers qgis-providers-common qhelpgenerator-qt5
  qml-module-qtcharts qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin qt3d-gltfsceneio-plugin
  qt3d-scene2d-plugin qt5-assistant qt5-image-formats-plugin-pdf qt5-image-formats-plugins qtattributionsscanner-qt5
  qtchooser qttools5-dev-tools rpcsvc-proto tk8.6-blt2.5 unicode-data unixodbc-common zlib1g-dev
Suggested packages:
  binutils-doc blt-demo g++-multilib g++-11-multilib gcc-11-doc gcc-multilib make autoconf automake libtool flex bison
  gcc-doc gcc-11-multilib gcc-11-locales libgdal-grass grass-dev grass-gui e00compr avce00 gnuplot gpsbabel gpstrans
  netpbm python3-rpy2 python3-termcolor grass grass-dev-doc apache2 | lighttpd | httpd libboost-doc libboost1.74-doc
  libboost-atomic1.74-dev libboost-chrono1.74-dev libboost-container1.74-dev libboost-context1.74-dev
  libboost-contract1.74-dev libboost-coroutine1.74-dev libboost-date-time1.74-dev libboost-exception1.74-dev
  libboost-fiber1.74-dev libboost-filesystem1.74-dev libboost-graph1.74-dev libboost-graph-parallel1.74-dev
  libboost-iostreams1.74-dev libboost-locale1.74-dev libboost-log1.74-dev libboost-math1.74-dev libboost-mpi1.74-dev
  libboost-mpi-python1.74-dev libboost-numpy1.74-dev libboost-program-options1.74-dev libboost-python1.74-dev
  libboost-random1.74-dev libboost-regex1.74-dev libboost-serialization1.74-dev libboost-stacktrace1.74-dev
  libboost-system1.74-dev libboost-test1.74-dev libboost-thread1.74-dev libboost-timer1.74-dev
  libboost-type-erasure1.74-dev libboost-wave1.74-dev libboost1.74-tools-dev libmpfrc++-dev libntl-dev
  libboost-nowide1.74-dev glibc-doc libfftw3-bin libfftw3-dev geotiff-bin libgeotiff-epsg gsl-ref-psdoc | gsl-doc-pdf
  | gsl-doc-info | gsl-ref-html libhdf4-doc libhdf4-alt-dev hdf4-tools libjs-jquery-ui-docs odbc-postgresql tdsodbc
  ogdi-bin libqscintilla2-doc qt5-qmltooling-plugins libstdc++-11-doc tk8.6 libxsimd-doc python-attr-doc
  python-cycler-doc python3-genshi python-jinja2-doc python-jsonschema-doc python3-pip python-lxml-doc dvipng ffmpeg
  fonts-staypuft inkscape ipython3 python-matplotlib-doc python3-cairocffi python3-gobject python3-tornado
  texlive-extra-utils texlive-latex-extra python-mpmath-doc python3-gmpy2 gfortran python-numpy-doc python3-pytest
  python-pil-doc python3-pandas python3-ipykernel python-ply-doc python-psycopg2-doc python-pygments-doc
  ttf-bitstream-vera otb-qgis saga python-scipy-doc python-setuptools-doc texlive-fonts-extra python-sympy-doc
  python-tenacity-doc tix python3-tk-dbg qt5-doc
The following NEW packages will be installed:
  binutils binutils-common binutils-x86-64-linux-gnu blt fonts-lyx g++ g++-11 gcc gcc-11 gdal-bin gdal-data grass-core
  grass-doc javascript-common libaec0 libarmadillo10 libarpack2 libasan6 libassimp5 libbinutils libblosc1 libboost-dev
  libboost1.74-dev libc-dev-bin libc-devtools libc6-dev libcc1-0 libcfitsio9 libcharls2 libclang1-14 libcrypt-dev
  libctf-nobfd0 libctf0 libde265-0 libdraco4 libexpat1-dev libfcgi-bin libfcgi0ldbl libfftw3-double3 libfreexl1
  libfyba0 libgcc-11-dev libgdal30 libgeos-c1v5 libgeos3.10.2 libgeotiff5 libgsl27 libgslcblas0 libhdf4-0-alt
  libhdf5-103-1 libhdf5-cpp-103-1 libhdf5-hl-100 libheif1 libitm1 libjs-jquery libjs-jquery-ui libjs-leaflet
  libjs-sphinxdoc libjs-underscore libkmlbase1 libkmldom1 libkmlengine1 liblaszip8 liblbfgsb0 libllvm14 liblsan0
  libminizip1 libmng2 libmysqlclient21 libnetcdf19 libnsl-dev libodbc2 libodbcinst2 libogdi4.1 libopenblas-dev
  libopenblas-pthread-dev libopenblas0 libopenblas0-pthread libpdal-base13 libpdal-plugin-draco libpdal-plugin-e57
  libpdal-plugin-faux libpdal-plugin-hdf libpdal-plugin-i3s libpdal-plugin-icebridge libpdal-plugin-pgpointcloud
  libpdal-plugins libpdal-util13 libpq5 libproj22 libprotobuf-lite23 libpython3-dev libpython3.10-dev libqca-qt5-2
  libqca-qt5-2-plugins libqgis-3d3.32.2 libqgis-analysis3.32.2 libqgis-app3.32.2 libqgis-core3.32.2
  libqgis-customwidgets libqgis-gui3.32.2 libqgis-native3.32.2 libqgis-server3.32.2 libqgisgrass7-3.32.2
  libqgispython3.32.2 libqhull-r8.0 libqscintilla2-qt5-15 libqscintilla2-qt5-l10n libqt53danimation5 libqt53dcore5
  libqt53dextras5 libqt53dinput5 libqt53dlogic5 libqt53dquickscene2d5 libqt53drender5 libqt5charts5 libqt5concurrent5
  libqt5designer5 libqt5designercomponents5 libqt5help5 libqt5keychain1 libqt5location5 libqt5multimedia5
  libqt5multimediawidgets5 libqt5opengl5 libqt5pdf5 libqt5positioning5 libqt5positioningquick5 libqt5printsupport5
  libqt5qml5 libqt5qmlmodels5 libqt5quick5 libqt5quickwidgets5 libqt5sensors5 libqt5serialport5 libqt5sql5
  libqt5sql5-sqlite libqt5svg5 libqt5test5 libqt5webchannel5 libqt5webkit5 libqt5xml5 libqwt-qt5-6 librttopo1
  libspatialindex6 libspatialite7 libsqlite3-mod-spatialite libstdc++-11-dev libsuperlu5 libsz2 libtirpc-dev libtk8.6
  libtsan0 libubsan1 liburiparser1 libxerces-c3.2 libxsimd-dev libzip4 linux-libc-dev manpages-dev mysql-common
  proj-bin proj-data python-babel-localedata python-matplotlib-data python3-appdirs python3-attr python3-babel
  python3-beniget python3-brotli python3-bs4 python3-cycler python3-decorator python3-dev python3-distutils
  python3-fonttools python3-fs python3-gast python3-gdal python3-html5lib python3-ipython-genutils python3-jinja2
  python3-jsonschema python3-jupyter-core python3-kiwisolver python3-lxml python3-lz4 python3-matplotlib
  python3-mpmath python3-nbformat python3-numpy python3-owslib python3-packaging python3-pbr python3-pil.imagetk
  python3-plotly python3-ply python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci
  python3-pyqt5.qtmultimedia python3-pyqt5.qtpositioning python3-pyqt5.qtsql python3-pyqt5.qtsvg
  python3-pyqt5.qtwebkit python3-pyqt5.sip python3-pyrsistent python3-pythran python3-qgis python3-qgis-common
  python3-scipy python3-setuptools python3-sip python3-soupsieve python3-sympy python3-tenacity python3-tk
  python3-traitlets python3-ufolib2 python3-unicodedata2 python3-webencodings python3.10-dev qdoc-qt5 qgis qgis-common
  qgis-plugin-grass qgis-plugin-grass-common qgis-provider-grass qgis-providers qgis-providers-common
  qhelpgenerator-qt5 qml-module-qtcharts qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin
  qt3d-gltfsceneio-plugin qt3d-scene2d-plugin qt5-assistant qt5-image-formats-plugin-pdf qt5-image-formats-plugins
  qtattributionsscanner-qt5 qtchooser qttools5-dev-tools rpcsvc-proto tk8.6-blt2.5 unicode-data unixodbc-common
  zlib1g-dev
0 upgraded, 249 newly installed, 0 to remove and 11 not upgraded.
Need to get 417 MB of archives.
...

QGISを起動する!

QGISを起動します。

$ qgis

以下の画面が表示されます。

QGISのバージョンは、3.32でした。

おわりに

QGISを、QGISのリポジトリを使用して、最新版をインストールしました。

参考情報

QGISのインストール(Debian/Ubuntu)

関連記事

関連書籍(Amazon)

N/A