How To Install osm2pgsql on Fedora 36

In this tutorial we learn how to install osm2pgsql in Fedora 36. osm2pgsql is Import map data from OpenStreetMap to a PostgreSQL database

Introduction

In this tutorial we learn how to install osm2pgsql on Fedora 36.

What is osm2pgsql

Processes the planet file from the community mapping project at http database stored in PostgreSQL with PostGIS geospatial extensions. This database may then be used to render maps with Mapnik or for other geospatial analysis.

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

Install osm2pgsql on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install osm2pgsql

Install osm2pgsql on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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

sudo yum -y install osm2pgsql

How To Uninstall osm2pgsql on Fedora 36

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

sudo dnf remove osm2pgsql

osm2pgsql Package Contents on Fedora 36

/usr/bin/osm2pgsql
/usr/bin/osm2pgsql-replication
/usr/lib/.build-id
/usr/lib/.build-id/ba
/usr/lib/.build-id/ba/fd35b2d47719943ecf109d765abcad1fd6114d
/usr/share/doc/osm2pgsql
/usr/share/doc/osm2pgsql/AUTHORS
/usr/share/doc/osm2pgsql/CONTRIBUTING.md
/usr/share/doc/osm2pgsql/README.md
/usr/share/licenses/osm2pgsql
/usr/share/licenses/osm2pgsql/COPYING
/usr/share/man/man1/osm2pgsql-replication.1.gz
/usr/share/man/man1/osm2pgsql.1.gz
/usr/share/osm2pgsql
/usr/share/osm2pgsql/default.style
/usr/share/osm2pgsql/empty.style

References

Summary

In this tutorial we learn how to install osm2pgsql on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).