How To Install gdal on Fedora 34

gdal is GIS file format library

Introduction

In this tutorial we learn how to install gdal on Fedora 34.

What is gdal

Geospatial Data Abstraction Library (GDAL/OGR) is a cross platform C++ translator library for raster and vector geospatial data formats. As a library, it presents a single abstract data model to the calling application for all supported formats. It also comes with a variety of useful commandline utilities for data translation and processing. It provides the primary data access engine for many applications. GDAL/OGR is the most widely used geospatial data access library.

We can use yum or dnf to install gdal on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install gdal.

Install gdal on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install gdal using dnf by running the following command:

sudo dnf -y install gdal

Install gdal on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install gdal using yum by running the following command:

sudo yum -y install gdal

How To Uninstall gdal on Fedora 34

To uninstall only the gdal package we can use the following command:

sudo dnf remove gdal

gdal Package Contents on Fedora 34

/usr/bin/8211createfromxml
/usr/bin/8211dump
/usr/bin/8211view
/usr/bin/gdal_contour
/usr/bin/gdal_create
/usr/bin/gdal_grid
/usr/bin/gdal_rasterize
/usr/bin/gdal_translate
/usr/bin/gdal_viewshed
/usr/bin/gdaladdo
/usr/bin/gdalbuildvrt
/usr/bin/gdaldem
/usr/bin/gdalenhance
/usr/bin/gdalinfo
/usr/bin/gdallocationinfo
/usr/bin/gdalmanage
/usr/bin/gdalmdiminfo
/usr/bin/gdalmdimtranslate
/usr/bin/gdalsrsinfo
/usr/bin/gdaltindex
/usr/bin/gdaltransform
/usr/bin/gdalwarp
/usr/bin/gnmanalyse
/usr/bin/gnmmanage
/usr/bin/nearblack
/usr/bin/ogr2ogr
/usr/bin/ogrinfo
/usr/bin/ogrlineref
/usr/bin/ogrmerge.py
/usr/bin/ogrtindex
/usr/bin/s57dump
/usr/bin/testepsg
/usr/lib/.build-id
/usr/lib/.build-id/10
/usr/lib/.build-id/10/9aa3a340d6dfdb4677da92c1dfa2e7797916a2
/usr/lib/.build-id/21
/usr/lib/.build-id/21/29224f7fb669d1937a8249810c235b24366bca
/usr/lib/.build-id/26
/usr/lib/.build-id/26/16586aafa2c66d32cd0b4fa5d4faebdeeea87a
/usr/lib/.build-id/29
/usr/lib/.build-id/29/0102306146056675cb6d3b2f651a18efcf4de0
/usr/lib/.build-id/2c
/usr/lib/.build-id/2c/90d944b60d5a58b059fb155a997456c407f1cc
/usr/lib/.build-id/31
/usr/lib/.build-id/31/6fe4a9e74255c004ddb78e8b0df946f673d4aa
/usr/lib/.build-id/33
/usr/lib/.build-id/33/873ca59d58e857421e96d2487389f23005ac74
/usr/lib/.build-id/3c
/usr/lib/.build-id/3c/52cc70af9cf52b5e943d2fb5c22ee57f41638c
/usr/lib/.build-id/3c/576500a2d416e45c8d556fe569245efc0da293
/usr/lib/.build-id/3c/df1c22023af006beea5c8c9b4c85311531ab1f
/usr/lib/.build-id/57
/usr/lib/.build-id/57/63f3e00e4323657d3fbf98f8af3260d22601c2
/usr/lib/.build-id/59
/usr/lib/.build-id/59/8b5e1ba09eb084c38aead857a2031208d9a39d
/usr/lib/.build-id/6f
/usr/lib/.build-id/6f/c316110cda8e956d889c7e61e698cb62773a2c
/usr/lib/.build-id/74
/usr/lib/.build-id/74/1e1146a377cb0a0642e9faeda5cdb966e6e0ab
/usr/lib/.build-id/7e
/usr/lib/.build-id/7e/2fc99ff593c59e74c091ae9acae68bba07c069
/usr/lib/.build-id/80
/usr/lib/.build-id/80/8a70590f6d91a503608b8f54b2f6340b33ff48
/usr/lib/.build-id/92
/usr/lib/.build-id/92/800390fd8f6fdd515027bbc37745a8db059371
/usr/lib/.build-id/a4
/usr/lib/.build-id/a4/da0bb1a0f36ca385ad489ff6c6b1b7a675ca96
/usr/lib/.build-id/a8
/usr/lib/.build-id/a8/c7edb96b9cca5a885f8fbf3d54110027f9cd14
/usr/lib/.build-id/af
/usr/lib/.build-id/af/9cf8b5db3de04ae6aec27c12aed57d1e8629c2
/usr/lib/.build-id/bf
/usr/lib/.build-id/bf/2b2340a49a292d5954a57601888cb59745e34b
/usr/lib/.build-id/c1
/usr/lib/.build-id/c1/cc699ecce157faa8600c0fd95ee35e8bd6a40a
/usr/lib/.build-id/cd
/usr/lib/.build-id/cd/cf1d13cb901674e89537a1aa0e0cb6c104d148
/usr/lib/.build-id/db
/usr/lib/.build-id/db/a3e97c73baa2a9c5e464ebb1eab185a9f6b879
/usr/lib/.build-id/db/bd4f3ff15ff4a7639b8423190a04b3e429c954
/usr/lib/.build-id/f0
/usr/lib/.build-id/f0/c63a3c162a6b69be411991ff67ef53dcd8e1e5
/usr/lib/.build-id/fc
/usr/lib/.build-id/fc/e1f063d346eb46ed9c3534ff33d96fce660412
/usr/share/bash-completion/completions/gdal-config
/usr/share/bash-completion/completions/gdal2tiles.py
/usr/share/bash-completion/completions/gdal2xyz.py
/usr/share/bash-completion/completions/gdal_calc.py
/usr/share/bash-completion/completions/gdal_contour
/usr/share/bash-completion/completions/gdal_edit.py
/usr/share/bash-completion/completions/gdal_fillnodata.py
/usr/share/bash-completion/completions/gdal_grid
/usr/share/bash-completion/completions/gdal_merge.py
/usr/share/bash-completion/completions/gdal_polygonize.py
/usr/share/bash-completion/completions/gdal_proximity.py
/usr/share/bash-completion/completions/gdal_rasterize
/usr/share/bash-completion/completions/gdal_retile.py
/usr/share/bash-completion/completions/gdal_sieve.py
/usr/share/bash-completion/completions/gdal_translate
/usr/share/bash-completion/completions/gdaladdo
/usr/share/bash-completion/completions/gdalbuildvrt
/usr/share/bash-completion/completions/gdalchksum.py
/usr/share/bash-completion/completions/gdalcompare.py
/usr/share/bash-completion/completions/gdaldem
/usr/share/bash-completion/completions/gdalenhance
/usr/share/bash-completion/completions/gdalident.py
/usr/share/bash-completion/completions/gdalimport.py
/usr/share/bash-completion/completions/gdalinfo
/usr/share/bash-completion/completions/gdallocationinfo
/usr/share/bash-completion/completions/gdalmanage
/usr/share/bash-completion/completions/gdalmove.py
/usr/share/bash-completion/completions/gdalserver
/usr/share/bash-completion/completions/gdalsrsinfo
/usr/share/bash-completion/completions/gdaltindex
/usr/share/bash-completion/completions/gdaltransform
/usr/share/bash-completion/completions/gdalwarp
/usr/share/bash-completion/completions/ogr2ogr
/usr/share/bash-completion/completions/ogrinfo
/usr/share/bash-completion/completions/ogrlineref
/usr/share/bash-completion/completions/ogrmerge.py
/usr/share/bash-completion/completions/ogrtindex
/usr/share/man/man1/gdal_calc.1.gz
/usr/share/man/man1/gdal_contour.1.gz
/usr/share/man/man1/gdal_create.1.gz
/usr/share/man/man1/gdal_edit.1.gz
/usr/share/man/man1/gdal_grid.1.gz
/usr/share/man/man1/gdal_pansharpen.1.gz
/usr/share/man/man1/gdal_polygonize.1.gz
/usr/share/man/man1/gdal_proximity.1.gz
/usr/share/man/man1/gdal_rasterize.1.gz
/usr/share/man/man1/gdal_translate.1.gz
/usr/share/man/man1/gdal_viewshed.1.gz
/usr/share/man/man1/gdaladdo.1.gz
/usr/share/man/man1/gdalbuildvrt.1.gz
/usr/share/man/man1/gdalcompare.1.gz
/usr/share/man/man1/gdaldem.1.gz
/usr/share/man/man1/gdalinfo.1.gz
/usr/share/man/man1/gdallocationinfo.1.gz
/usr/share/man/man1/gdalmanage.1.gz
/usr/share/man/man1/gdalmdiminfo.1.gz
/usr/share/man/man1/gdalmdimtranslate.1.gz
/usr/share/man/man1/gdalmove.1.gz
/usr/share/man/man1/gdalsrsinfo.1.gz
/usr/share/man/man1/gdaltindex.1.gz
/usr/share/man/man1/gdaltransform.1.gz
/usr/share/man/man1/gdalwarp.1.gz
/usr/share/man/man1/gnmanalyse.1.gz
/usr/share/man/man1/gnmmanage.1.gz
/usr/share/man/man1/nearblack.1.gz
/usr/share/man/man1/ogr2ogr.1.gz
/usr/share/man/man1/ogrinfo.1.gz
/usr/share/man/man1/ogrlineref.1.gz
/usr/share/man/man1/ogrmerge.1.gz
/usr/share/man/man1/ogrtindex.1.gz
/usr/bin/8211createfromxml
/usr/bin/8211dump
/usr/bin/8211view
/usr/bin/gdal_contour
/usr/bin/gdal_create
/usr/bin/gdal_grid
/usr/bin/gdal_rasterize
/usr/bin/gdal_translate
/usr/bin/gdal_viewshed
/usr/bin/gdaladdo
/usr/bin/gdalbuildvrt
/usr/bin/gdaldem
/usr/bin/gdalenhance
/usr/bin/gdalinfo
/usr/bin/gdallocationinfo
/usr/bin/gdalmanage
/usr/bin/gdalmdiminfo
/usr/bin/gdalmdimtranslate
/usr/bin/gdalsrsinfo
/usr/bin/gdaltindex
/usr/bin/gdaltransform
/usr/bin/gdalwarp
/usr/bin/gnmanalyse
/usr/bin/gnmmanage
/usr/bin/nearblack
/usr/bin/ogr2ogr
/usr/bin/ogrinfo
/usr/bin/ogrlineref
/usr/bin/ogrmerge.py
/usr/bin/ogrtindex
/usr/bin/s57dump
/usr/bin/testepsg
/usr/lib/.build-id
/usr/lib/.build-id/1a
/usr/lib/.build-id/1a/3a4f80a86001b016fe0056e30b2c94c3115d34
/usr/lib/.build-id/1b
/usr/lib/.build-id/1b/513209503a408559ad9e6f72e0525d1113233f
/usr/lib/.build-id/1f
/usr/lib/.build-id/1f/cfb93d35f2dea570a73863cf0e9390b710a16d
/usr/lib/.build-id/20
/usr/lib/.build-id/20/4c8e4f9ae9f6e701ffe49988a50d0a660da8f1
/usr/lib/.build-id/24
/usr/lib/.build-id/24/deee883fd43254ad7282eb56228654405a005b
/usr/lib/.build-id/26
/usr/lib/.build-id/26/14d02414e6e1f060ff8390bdb53bc588a04f65
/usr/lib/.build-id/2b
/usr/lib/.build-id/2b/d6fffe0c17df6a5fc49671e9dfafad379370bc
/usr/lib/.build-id/2f
/usr/lib/.build-id/2f/14ba7a325f6def2935a01cfdeb4b07be304aea
/usr/lib/.build-id/36
/usr/lib/.build-id/36/dbe98d44526c2146a43e5196ece4b39b7c7aee
/usr/lib/.build-id/3a
/usr/lib/.build-id/3a/8548b487c96934665e97aa4e7d9a806a65c6a5
/usr/lib/.build-id/41
/usr/lib/.build-id/41/2f6b48599dfa7316ea1eeac63f8a3639c3d164
/usr/lib/.build-id/4a
/usr/lib/.build-id/4a/b7c9d9ff6f4849885c1dee727140e979ca82ec
/usr/lib/.build-id/57
/usr/lib/.build-id/57/7932334172ef39116825ecc2fce436c157ca82
/usr/lib/.build-id/69
/usr/lib/.build-id/69/cdb2207aff75eebc03242125389ac979efa8ea
/usr/lib/.build-id/6b
/usr/lib/.build-id/6b/75cd7672167b2840527aab7c37d5f679dfbd80
/usr/lib/.build-id/78
/usr/lib/.build-id/78/d19a7af04b3d2093eb87b3347ee1a0b5f267ab
/usr/lib/.build-id/7c
/usr/lib/.build-id/7c/fa3a7e9388265c4b5de82609748294fb08aa6e
/usr/lib/.build-id/94
/usr/lib/.build-id/94/59dabe55babd84f00914324ae932102a2a0d74
/usr/lib/.build-id/a7
/usr/lib/.build-id/a7/091cfa08d1d235a2c6a64ec7ad41162c8cb154
/usr/lib/.build-id/a7/30b7d167d7a106d09d409493993985bd461a61
/usr/lib/.build-id/ae
/usr/lib/.build-id/ae/96c25be2f71e2d7ccbd559de36008ddc3cbeb2
/usr/lib/.build-id/b5
/usr/lib/.build-id/b5/a328b68f7d8f43cae3b8975aeb4c40786bbc2e
/usr/lib/.build-id/c0
/usr/lib/.build-id/c0/76353e48438822c577f3bf53a557f006861962
/usr/lib/.build-id/ca
/usr/lib/.build-id/ca/23d8518a109b77bd3834aee5afa2eef9874348
/usr/lib/.build-id/cc
/usr/lib/.build-id/cc/989d3b35c165116d35aa3e018d3de7c723be96
/usr/lib/.build-id/dc
/usr/lib/.build-id/dc/6d9ee3aacd284bb643da899ff407841759e410
/usr/lib/.build-id/f2
/usr/lib/.build-id/f2/05613ce728301d9c995cb77d9e32af2076861b
/usr/share/bash-completion/completions/gdal-config
/usr/share/bash-completion/completions/gdal2tiles.py
/usr/share/bash-completion/completions/gdal2xyz.py
/usr/share/bash-completion/completions/gdal_calc.py
/usr/share/bash-completion/completions/gdal_contour
/usr/share/bash-completion/completions/gdal_edit.py
/usr/share/bash-completion/completions/gdal_fillnodata.py
/usr/share/bash-completion/completions/gdal_grid
/usr/share/bash-completion/completions/gdal_merge.py
/usr/share/bash-completion/completions/gdal_polygonize.py
/usr/share/bash-completion/completions/gdal_proximity.py
/usr/share/bash-completion/completions/gdal_rasterize
/usr/share/bash-completion/completions/gdal_retile.py
/usr/share/bash-completion/completions/gdal_sieve.py
/usr/share/bash-completion/completions/gdal_translate
/usr/share/bash-completion/completions/gdaladdo
/usr/share/bash-completion/completions/gdalbuildvrt
/usr/share/bash-completion/completions/gdalchksum.py
/usr/share/bash-completion/completions/gdalcompare.py
/usr/share/bash-completion/completions/gdaldem
/usr/share/bash-completion/completions/gdalenhance
/usr/share/bash-completion/completions/gdalident.py
/usr/share/bash-completion/completions/gdalimport.py
/usr/share/bash-completion/completions/gdalinfo
/usr/share/bash-completion/completions/gdallocationinfo
/usr/share/bash-completion/completions/gdalmanage
/usr/share/bash-completion/completions/gdalmove.py
/usr/share/bash-completion/completions/gdalserver
/usr/share/bash-completion/completions/gdalsrsinfo
/usr/share/bash-completion/completions/gdaltindex
/usr/share/bash-completion/completions/gdaltransform
/usr/share/bash-completion/completions/gdalwarp
/usr/share/bash-completion/completions/ogr2ogr
/usr/share/bash-completion/completions/ogrinfo
/usr/share/bash-completion/completions/ogrlineref
/usr/share/bash-completion/completions/ogrmerge.py
/usr/share/bash-completion/completions/ogrtindex
/usr/share/man/man1/gdal_calc.1.gz
/usr/share/man/man1/gdal_contour.1.gz
/usr/share/man/man1/gdal_create.1.gz
/usr/share/man/man1/gdal_edit.1.gz
/usr/share/man/man1/gdal_grid.1.gz
/usr/share/man/man1/gdal_pansharpen.1.gz
/usr/share/man/man1/gdal_polygonize.1.gz
/usr/share/man/man1/gdal_proximity.1.gz
/usr/share/man/man1/gdal_rasterize.1.gz
/usr/share/man/man1/gdal_translate.1.gz
/usr/share/man/man1/gdal_viewshed.1.gz
/usr/share/man/man1/gdaladdo.1.gz
/usr/share/man/man1/gdalbuildvrt.1.gz
/usr/share/man/man1/gdalcompare.1.gz
/usr/share/man/man1/gdaldem.1.gz
/usr/share/man/man1/gdalinfo.1.gz
/usr/share/man/man1/gdallocationinfo.1.gz
/usr/share/man/man1/gdalmanage.1.gz
/usr/share/man/man1/gdalmdiminfo.1.gz
/usr/share/man/man1/gdalmdimtranslate.1.gz
/usr/share/man/man1/gdalmove.1.gz
/usr/share/man/man1/gdalsrsinfo.1.gz
/usr/share/man/man1/gdaltindex.1.gz
/usr/share/man/man1/gdaltransform.1.gz
/usr/share/man/man1/gdalwarp.1.gz
/usr/share/man/man1/gnmanalyse.1.gz
/usr/share/man/man1/gnmmanage.1.gz
/usr/share/man/man1/nearblack.1.gz
/usr/share/man/man1/ogr2ogr.1.gz
/usr/share/man/man1/ogrinfo.1.gz
/usr/share/man/man1/ogrlineref.1.gz
/usr/share/man/man1/ogrmerge.1.gz
/usr/share/man/man1/ogrtindex.1.gz

References

Summary

In this tutorial we learn how to install gdal on Fedora 34 using yum and dnf.