# 使用 Homebrew, apk, dnf, Nix, apt, MacPorts 安装 eccodes

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

## 安装

```sh
sudo av install brew:eccodes
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install eccodes
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install ecCodes
```

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

### Linux

- apk (92%):

```sh
sudo apk add eccodes
```

  证据: Alpine Linux edge package indexes: eccodes from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install eccodes
```

  证据: Fedora Rawhide package metadata: eccodes 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#eccodes
```

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

- Debian apt (92%):

```sh
sudo apt install libeccodes-data
```

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

## 软件包事实

- **软件包键:** brew:eccodes
- **软件包管理器:** Homebrew
- **版本:** 2.48.0
- **来源摘要:** Decode and encode messages in the GRIB 1/2 and BUFR 3/4 formats
- **主页:** <https://confluence.ecmwf.int/display/ECC>
- **最后更新:** 2026-07-15T21:02:11Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- bufr_compare (别名)
- bufr_compare_dir (别名)
- bufr_copy (别名)
- bufr_count (别名)
- bufr_dump (别名)
- bufr_filter (别名)
- bufr_get (别名)
- bufr_index_build (别名)
- bufr_ls (别名)
- bufr_set (别名)
- codes_bufr_filter (别名)
- codes_config (别名)
- codes_count (别名)
- codes_export_resource (别名)
- codes_info (别名)
- codes_parser (别名)
- codes_split_file (别名)
- grib2ppm (别名)
- grib_compare (别名)
- grib_copy (别名)
- grib_count (别名)
- grib_dump (别名)
- grib_filter (别名)
- grib_get (别名)
- grib_get_data (别名)
- grib_histogram (别名)
- grib_index_build (别名)
- grib_ls (别名)
- grib_set (别名)
- grib_to_netcdf (别名)
- gts_compare (别名)
- gts_copy (别名)
- gts_count (别名)
- gts_dump (别名)
- gts_filter (别名)
- gts_get (别名)
- gts_ls (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 2.48.0
## 项目历史与用法

ecCodes is ECMWF's library and command-line toolkit for decoding and encoding meteorological message formats, especially GRIB and BUFR. It is package-manager significant because it is infrastructure: many weather, climate, forecasting, and data-conversion workflows depend on having its tools and libraries installed correctly.

### 项目历史

ECMWF describes ecCodes as a package providing an API and command-line tools for WMO GRIB editions 1 and 2, BUFR editions 3 and 4, and decoding of WMO GTS abbreviated headers. The repository README says it provides C, Fortran 90, and Python interfaces along with quick command-line access to messages.

The project is explicitly the evolution of ECMWF's older GRIB-API. ECMWF's documentation says ecCodes fully provides GRIB-API functionality for GRIB encoding and decoding, keeps the C, Fortran 90, and Python interfaces, drops the old Fortran 77 interface, and adds a codes_ API that works across supported message formats.

ECMWF marks ecCodes as the primary GRIB encoding/decoding package used at ECMWF and notes that GRIB-API has not been maintained since December 2018. That replacement history is central to ecCodes adoption: existing GRIB-API users were strongly advised to migrate, with compatibility maintained where possible.

The GitHub repository was created in December 2018 and is still active, with the README carrying ECMWF software maturity badges and 2026 releases in the 2.4x series.

### 采用历史

ecCodes' adoption follows the operational meteorology stack rather than the usual application-CLI pattern. It is used where GRIB and BUFR data are read, written, inspected, filtered, converted, or bridged into Python, Fortran, C, and NetCDF workflows.

Package metadata shows ecCodes available in Homebrew, Alpine, Fedora-family packaging, MacPorts, Nix, and Debian/Ubuntu data packages. That broad packaging matters because meteorological tools often expect ecCodes definitions and command-line programs such as grib_ls, grib_get, grib_set, bufr_dump, and grib_to_netcdf to be present.

### 使用方式

Users commonly install ecCodes for command-line inspection and transformation of GRIB/BUFR files, for language bindings, or as a dependency of higher-level weather-data software. The command suite includes GRIB, BUFR, GTS, and generic codes_* tools.

The migration documentation explains that many GRIB-API functions and tools were retained or mapped into ecCodes, while some experimental or superseded tools were removed. That makes ecCodes both a compatibility layer for old workflows and the maintained path forward.

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

ecCodes is the kind of package that quietly makes scientific software distributions work. It ships binary tools, libraries, format definitions, samples, and bindings around specialized international data formats; small packaging mistakes can break large data-processing pipelines.

It is also a case study in successor packaging: GRIB-API users needed a maintained replacement that preserved enough CLI and ABI/API behavior to make migration practical while adding BUFR and GTS coverage under one key/value access model.

### 时间线

- 2005: ECMWF copyright range for the software begins.
- 2018: ecCodes GitHub repository created; GRIB-API maintenance ends in December 2018.
- 2021-2022: Public GitHub releases show active 2.x release cadence.
- 2026: ecCodes 2.47.0 released and repository remains active.

### Related projects

- GRIB-API is the direct predecessor and compatibility target for much of ecCodes' GRIB functionality.
- CodesUI, mentioned in ECMWF's ecCodes documentation, is a related user interface for ecCodes.
- Higher-level meteorological software commonly pairs ecCodes with Python bindings, Fortran/C applications, and conversion tools such as grib_to_netcdf.

### 来源

- <https://github.com/ecmwf/eccodes>
- <https://raw.githubusercontent.com/ecmwf/eccodes/develop/README.md>
- <https://confluence.ecmwf.int/display/ECC/ecCodes+Home>
- <https://confluence.ecmwf.int/display/ECC/What+is+ecCodes>
- <https://confluence.ecmwf.int/display/ECC/GRIB-API+migration>
- <https://github.com/ecmwf/eccodes/releases>
- <https://api.github.com/repos/ecmwf/eccodes>


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Debian apt - libeccodes-data - 2.41.0-1: normalized package name match | Debian stable package indexes: libeccodes-data from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GRIB and BUFR enecoding/encoding software library - data | https://software.ecmwf.int/wiki/display/ECC/ecCodes+Home
- Debian apt - libeccodes-dev - 2.41.0-1: normalized package name match | Debian stable package indexes: libeccodes-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GRIB and BUFR decoding/encoding software library (development) | https://software.ecmwf.int/wiki/display/ECC/ecCodes+Home
- Debian apt - libeccodes-doc - 2.41.0-1: normalized package name match | Debian stable package indexes: libeccodes-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GRIB decoding/encoding software (documentation) | https://software.ecmwf.int/wiki/display/ECC/ecCodes+Home
- Debian apt - libeccodes-tools - 2.41.0-1: normalized package name match | Debian stable package indexes: libeccodes-tools from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GRIB decoding/encoding software (utilities) | https://software.ecmwf.int/wiki/display/ECC/ecCodes+Home
- Debian apt - libeccodes0 - 2.41.0-1: normalized package name match | Debian stable package indexes: libeccodes0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GRIB and BUFR enecoding/encoding software library | https://software.ecmwf.int/wiki/display/ECC/ecCodes+Home
- Nix - eccodes: normalized package name match | nixpkgs package indexes: pkgs/by-name/ec/eccodes/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libeccodes-data - 2.34.1-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libeccodes-data from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | GRIB and BUFR enecoding/encoding software library - data | https://software.ecmwf.int/wiki/display/ECC/ecCodes+Home
- Ubuntu apt - libeccodes-dev - 2.34.1-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libeccodes-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | GRIB and BUFR decoding/encoding software library (development) | https://software.ecmwf.int/wiki/display/ECC/ecCodes+Home
- Ubuntu apt - libeccodes-doc - 2.34.1-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libeccodes-doc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | GRIB decoding/encoding software (documentation) | https://software.ecmwf.int/wiki/display/ECC/ecCodes+Home
- Ubuntu apt - libeccodes-tools - 2.34.1-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libeccodes-tools from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | GRIB decoding/encoding software (utilities) | https://software.ecmwf.int/wiki/display/ECC/ecCodes+Home
- Ubuntu apt - libeccodes0 - 2.34.1-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libeccodes0 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | GRIB and BUFR enecoding/encoding software library | https://software.ecmwf.int/wiki/display/ECC/ecCodes+Home
- apk - eccodes - 2.48.0-r0: normalized package name match | Alpine Linux edge package indexes: eccodes from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | API and tools for decoding and encoding WMO meteorological message formats | https://github.com/ecmwf/eccodes
- dnf - eccodes - 2.48.0-1.fc45: normalized package name match | Fedora Rawhide package metadata: eccodes from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | WMO data format decoding and encoding | https://confluence.ecmwf.int/display/ECC/ecCodes+Home
- dnf - eccodes-data - 2.48.0-1.fc45: normalized package name match | Fedora Rawhide package metadata: eccodes-data from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Data needed by the eccodes library and tools | https://confluence.ecmwf.int/display/ECC/ecCodes+Home
- dnf - eccodes-devel - 2.48.0-1.fc45: normalized package name match | Fedora Rawhide package metadata: eccodes-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Contains ecCodes development files | https://confluence.ecmwf.int/display/ECC/ecCodes+Home
- dnf - eccodes-doc - 2.48.0-1.fc45: normalized package name match | Fedora Rawhide package metadata: eccodes-doc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Documentation and example code | https://confluence.ecmwf.int/display/ECC/ecCodes+Home


## Combined YAML source

View the package source record on GitHub. [combined/eccodes.yml](https://github.com/mxcl/pkgdb/blob/main/combined/eccodes.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
