# 使用 Homebrew, apt, dnf, MacPorts, Nix 安装 osmium-tool

查看 osmium-tool 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:osmium-tool
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install osmium-tool
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install osmium-tool
```

  证据: MacPorts ports tree: gis/osmium-tool/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install osmium-tool
```

  证据: Debian stable package indexes: osmium-tool from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install osmium-tool
```

  证据: Fedora Rawhide package metadata: osmium-tool from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#osmium-tool
```

  证据: nixpkgs package indexes: pkgs/by-name/os/osmium-tool/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:osmium-tool
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/osmium-tool>
- **版本:** 1.19.1
- **来源摘要:** Libosmium-based command-line tool for processing OpenStreetMap data
- **主页:** <https://osmcode.org/osmium-tool/>
- **仓库:** <https://github.com/osmcode/osmium-tool>
- **上游文档:** <https://osmcode.org/osmium-tool/>
- **许可证:** GPL-3.0-or-later
- **源码归档:** <https://github.com/osmcode/osmium-tool/archive/refs/tags/v1.19.1.tar.gz>
- **最后更新:** 2026-06-25T13:38:00+02:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- osmium (cli)
- osmium (别名)

## 依赖

- boost
- lz4

## 构建依赖

- cmake
- libosmium
- nlohmann-json
- pandoc
- protozero

## macOS 提供的库

- bzip2
- expat

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.19.1
- 管理器更新时间: 2026-06-25
- 本地数据: OK
- 上游仓库: https://github.com/osmcode/osmium-tool
- 检测到的最新版本: v1.19.1 (当前)
## 项目历史与用法

osmium-tool is the command-line front end for the Osmium/libosmium ecosystem, providing a single `osmium` executable for inspecting, converting, filtering, extracting, sorting, diffing, and updating OpenStreetMap data files.

### 项目历史

The tool grew out of Jochen Topf's Osmium work. The Osmium FAQ distinguishes the old Osmium library, developed from 2010 to 2013, from the C++11-based rewrite that began in 2013; osmium-tool is built on that newer libosmium stack. The repository credits Jochen Topf as writer and maintainer and carries copyright years beginning in 2013.

Its architecture follows libosmium's file-format and data-model abstractions. The manual describes the `osmium` command as a Git-like dispatcher with subcommands, while the website emphasizes a broad feature set ranging from file info and format conversion to history-file extraction and changeset filtering.

### 采用历史

osmium-tool became a standard utility for OSM data operators because it covers many routine jobs without requiring custom C++ code. The project site lists packages for Debian/Ubuntu, Fedora, Homebrew, and conda-forge, and the manual notes support and regular testing across Linux, macOS, and Windows.

In the OSM tooling timeline, Osmium also became the recommended alternative for some Osmosis users as Osmosis moved into light maintenance. That adoption pattern reflects a broader shift from Java pipeline tooling toward libosmium-backed C++ tools for high-volume file processing.

### 使用方式

Operators use osmium-tool to inspect extract metadata, convert between XML, PBF, O5M/O5C, OPL, and debug formats, build geographic extracts from bounding boxes or polygons, verify references in partial extracts, work with OSM history and change files, and chain these tasks inside shell scripts.

Its verbose mode, safety checks against overwriting output, and support for all major OSM file formats make it a pragmatic package for repeatable data jobs: download an extract, inspect headers, filter or cut the data, and feed the result into renderers, importers, or analysis systems.

### 为什么软件包爱好者会关心

For package nerds, osmium-tool is the visible CLI layer of a carefully separated stack: protozero for PBF encoding support, libosmium as a header-only C++ OSM library, and osmium-tool as the packaged executable suite. It is a good example of a domain library being exposed through a durable multipurpose command.

### Related projects

- libosmium provides the underlying C++ OSM data handling. PyOsmium exposes parts of that ecosystem to Python. Osmosis, osmfilter, and osrm-backend occupy nearby OSM data-processing and routing roles.

### 来源

- <https://formulae.brew.sh/formula/osmium-tool>
- <https://github.com/osmcode/osmium-tool>
- <https://osmcode.org/faq.html>
- <https://osmcode.org/osmium-tool/>
- <https://osmcode.org/osmium-tool/manual.html>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** osmium-tool
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## 其他软件包管理器记录

- Debian apt - osmium-tool - 1.18.0-1: normalized package name match | Debian stable package indexes: osmium-tool from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Command line tool for working with OpenStreetMap data | https://osmcode.org/osmium-tool/
- Nix - osmium-tool: normalized package name match | nixpkgs package indexes: pkgs/by-name/os/osmium-tool/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - osmium-tool - 1.16.0-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: osmium-tool from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Command line tool for working with OpenStreetMap data | https://osmcode.org/osmium-tool/
- dnf - osmium-tool - 1.19.1-2.fc45: normalized package name match | Fedora Rawhide package metadata: osmium-tool from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Command line tool for working with OpenStreetMap data | http://osmcode.org/osmium-tool/
- MacPorts - osmium-tool: normalized package name match | MacPorts ports tree: gis/osmium-tool/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Nix - osmium: installed executable or alias match | nixpkgs package indexes: pkgs/by-name/os/osmium/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Database and data packages](https://pkg.so/zh-hans/database-data-tools/) - Matched database, SQL, migration, or data-store metadata.
- [lz4](https://pkg.so/zh-hans/brew/lz4/) - Runtime dependency declared by Homebrew.
- [cmake](https://pkg.so/zh-hans/brew/cmake/) - Build dependency declared by Homebrew.
- [pandoc](https://pkg.so/zh-hans/brew/pandoc/) - Build dependency declared by Homebrew.
- [osmosis](https://pkg.so/zh-hans/brew/osmosis/) - Shares pkgdb curated category or tags: cli, data, data-processing, geospatial, openstreetmap.
- [pdal](https://pkg.so/zh-hans/brew/pdal/) - Shares pkgdb curated category or tags: cli, data, data-processing, geospatial.
- [osmcoastline](https://pkg.so/zh-hans/brew/osmcoastline/) - Shares pkgdb curated category or tags: cli, data, geospatial, openstreetmap.
- [osmfilter](https://pkg.so/zh-hans/brew/osmfilter/) - Shares pkgdb curated category or tags: cli, data, geospatial, openstreetmap.
- [libgeotiff](https://pkg.so/zh-hans/brew/libgeotiff/) - Shares pkgdb curated category or tags: cli, data, geospatial.
- [postgis](https://pkg.so/zh-hans/brew/postgis/) - Shares pkgdb curated category or tags: cli, data, geospatial.
- [pmtiles](https://pkg.so/zh-hans/brew/pmtiles/) - Shares pkgdb curated category or tags: cli, data, geospatial.
- [mapnik](https://pkg.so/zh-hans/brew/mapnik/) - Shares pkgdb curated category or tags: cli, data, geospatial.

## Combined YAML source

View the package source record on GitHub. [combined/osmium-tool.yml](https://github.com/mxcl/pkgdb/blob/main/combined/osmium-tool.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
