Skip to main content

Installing on Linux

There are packages of osm2pgsql available for many different Linux distributions. Some of them are quite old, though, and have known bugs. If the current release is not available for your distribution, consider installing the current release from source.

Installing on Ubuntu

Ubuntu 20.04 package Ubuntu 22.04 package

For Ubuntu installation is usually as simple as

apt install osm2pgsql

Installing on Debian

Debian 11 (Bullseye) package Debian 11 (Bullseye) Backports package Debian 12 (Bookworm) package Debian Testing package

For Debian installation is usually as simple as

apt install osm2pgsql

If you are using Debian Stable, we recommend using the packages from backports. Debian maintainers are really good at keeping these up-to-date.

Installing on Fedora

Fedora 37 package Fedora 38 package Fedora Rawhide package

Fedora has packages of osm2pgsql available. Install with

dnf install osm2pgsql

Installing on openSUSE

First add the “Geo” package repository (adapt URL to the openSUSE version you use):

zypper ar "Geo"
zypper refresh

Then install osm2pgsql:

zypper install osm2pgsql

Installing on Arch Linux

AUR package

Build the osm2pgsql-git package from the AUR. (Download the tarball and compile/install with makepkg, or use an AUR helper such as yaourt.)