# 使用 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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
- **版本:** 1.19.1
- **来源摘要:** Libosmium-based command-line tool for processing OpenStreetMap data
- **主页:** <https://osmcode.org/osmium-tool/>
- **仓库:** <https://github.com/osmcode/osmium-tool>
- **最后更新:** 2026-06-25T13:38:00+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- osmium (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.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

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

- 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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


## 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
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
