# Install netcdf-cxx with Homebrew, apt, dnf, MacPorts, pacman

C++ libraries and utilities for NetCDF. Version 4.3.1 via Homebrew; verified 2026-06-22.

## Install

```sh
sudo av install brew:netcdf-cxx
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install netcdf-cxx
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install netcdf-cxx
```

  Evidence: MacPorts ports tree: science/netcdf-cxx/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install libnetcdf-c++4-1
```

  Evidence: Debian stable package indexes: libnetcdf-c++4-1 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install netcdf-cxx
```

  Evidence: Fedora Rawhide package metadata: netcdf-cxx from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- pacman (92%):

```sh
sudo pacman -S netcdf-cxx
```

  Evidence: Arch Linux sync databases: netcdf-cxx from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

## Package facts

- **Package key:** brew:netcdf-cxx
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/netcdf-cxx>
- **Version:** 4.3.1
- **Source summary:** C++ libraries and utilities for NetCDF
- **Homepage:** <https://www.unidata.ucar.edu/software/netcdf/>
- **Repository:** <https://github.com/Unidata/netcdf-cxx4>
- **Upstream docs:** <https://docs.unidata.ucar.edu/netcdf-cxx/current>
- **License:** NetCDF
- **Source archive:** <https://github.com/Unidata/netcdf-cxx4/archive/refs/tags/v4.3.1.tar.gz>
- **Last updated:** 2026-06-22T14:05:37-07:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- ncxx4-config (cli)
- ncxx4-config (alias)

## Dependencies

- hdf5
- netcdf
- zstd

## Build dependencies

- cmake

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 4.3.1
- Package-manager updated: 2026-06-22
- Local data: ok
- Upstream repository: https://github.com/Unidata/netcdf-cxx4
- Upstream latest detected: v4.3.1 (current)
## Project history and usage

netcdf-cxx is Unidata's netCDF-4 C++ interface package. In Homebrew it is a small language-binding formula that depends on the main netcdf C library and installs the C++ library plus ncxx4-config for build integration.

### Project history

The modern netCDF-4 C++ API came from Lynton Appel of the Culham Centre for Fusion Energy, where it was developed for managing fusion research data from the MAST experiment. Unidata's C++ guide says the API is a complete read/write interface layered over the netCDF-4 C interface, replacing a previous partial C++ interface and using standard C++ features such as namespaces, exceptions, and templates that were not in the older mid-1990s netCDF-3 C++ API.

### Adoption history

The package is important inside scientific C++ builds but much smaller than the core netCDF C package. On July 1, 2026, Homebrew reported 652 installs over 365 days and 69 installs over 30 days for netcdf-cxx, compared with tens of thousands for netcdf itself. That shape matches its role as a language binding pulled in only by projects that compile C++ against netCDF directly.

### How it is used

Users install it when a C++ application needs native netCDF-4 read/write APIs rather than calling the C interface directly. In practice it is used by build systems through the installed headers, library, and ncxx4-config, and it inherits netCDF-C behavior, fixes, and file-format support because the C++ layer sits on top of the C library.

### Why package nerds care

The nerdy packaging point is dependency order: netcdf-cxx is not the file format itself, and it does not replace netcdf. It is a thin language-specific layer for C++ consumers, so mismatched netCDF-C versions, HDF5 support, and library naming are the kinds of issues that matter more than end-user CLI behavior.

### Timeline

- Mid-1990s: the first netCDF-3 C++ API existed, according to Unidata's C++ guide.
- 2016-05-13: netcdf-cxx4 v4.3.0 was released.
- 2019-09-12: netcdf-cxx4 v4.3.1 was released, requiring netCDF-C 4.6.0 or newer.
- 2026-07-01: Homebrew listed stable version 4.3.1 revision 3.

### Related projects

- netcdf
- netcdf-fortran
- netcdf4-python
- HDF5

### Sources

- <https://docs.unidata.ucar.edu/netcdf-cxx/current/RELEASE_NOTES.html>
- <https://formulae.brew.sh/formula/netcdf-cxx>
- <https://unidata.github.io/netcdf-cxx4/>
- <https://www.unidata.ucar.edu/software/netcdf/>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

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

## Other Package-Manager Records

- Debian apt - libnetcdf-c++4-1 - 4.3.1-5: normalized package name match | Debian stable package indexes: libnetcdf-c++4-1 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | C++ interface for scientific data access to large binary data | http://www.unidata.ucar.edu/software/netcdf/
- Debian apt - libnetcdf-c++4-dev - 4.3.1-5: normalized package name match | Debian stable package indexes: libnetcdf-c++4-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | creation, access, and sharing of scientific data in C++ | http://www.unidata.ucar.edu/software/netcdf/
- Debian apt - libnetcdf-c++4-doc - 4.3.1-5: normalized package name match | Debian stable package indexes: libnetcdf-c++4-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | NetCDF C++ API documentation | http://www.unidata.ucar.edu/software/netcdf/
- Ubuntu apt - libnetcdf-c++4-1 - 4.3.1-4build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libnetcdf-c++4-1 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | C++ interface for scientific data access to large binary data | http://www.unidata.ucar.edu/software/netcdf/
- Ubuntu apt - libnetcdf-c++4-dev - 4.3.1-4build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libnetcdf-c++4-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | creation, access, and sharing of scientific data in C++ | http://www.unidata.ucar.edu/software/netcdf/
- Ubuntu apt - libnetcdf-c++4-doc - 4.3.1-4build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libnetcdf-c++4-doc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | NetCDF C++ API documentation | http://www.unidata.ucar.edu/software/netcdf/
- dnf - netcdf-cxx - 4.2-43.fc44: normalized package name match | Fedora Rawhide package metadata: netcdf-cxx from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Legacy netCDF C++ library | http://www.unidata.ucar.edu/software/netcdf/
- dnf - netcdf-cxx-devel - 4.2-43.fc44: normalized package name match | Fedora Rawhide package metadata: netcdf-cxx-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development files legacy netCDF C++ library | http://www.unidata.ucar.edu/software/netcdf/
- dnf - netcdf-cxx-static - 4.2-43.fc44: normalized package name match | Fedora Rawhide package metadata: netcdf-cxx-static from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Static libraries for legacy netCDF C++ library | http://www.unidata.ucar.edu/software/netcdf/
- pacman - netcdf-cxx - 4.3.1-5: normalized package name match | Arch Linux sync databases: netcdf-cxx from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | NetCDF C++ bindings | https://github.com/Unidata/netcdf-cxx4/
- MacPorts - netcdf-cxx: normalized package name match | MacPorts ports tree: science/netcdf-cxx/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Database and data packages](https://www.automicvault.com/pkg/database-data-tools/) - Matched database, SQL, migration, or data-store metadata.
- [hdf5](https://www.automicvault.com/pkg/brew/hdf5/) - Runtime dependency declared by Homebrew.
- [netcdf](https://www.automicvault.com/pkg/brew/netcdf/) - Runtime dependency declared by Homebrew.
- [zstd](https://www.automicvault.com/pkg/brew/zstd/) - Runtime dependency declared by Homebrew.
- [cmake](https://www.automicvault.com/pkg/brew/cmake/) - Build dependency declared by Homebrew.
- [metview](https://www.automicvault.com/pkg/brew/metview/) - Popular package that depends on this formula.
- [netcdf-fortran](https://www.automicvault.com/pkg/brew/netcdf-fortran/) - Shares the same upstream homepage.
- [cgns](https://www.automicvault.com/pkg/brew/cgns/) - Shares av.db curated category or tags: cli, data, data-format, scientific-data.
- [hdf5-mpi](https://www.automicvault.com/pkg/brew/hdf5-mpi/) - Shares av.db curated category or tags: cli, data, scientific-data.
- [libgetdata](https://www.automicvault.com/pkg/brew/libgetdata/) - Shares av.db curated category or tags: cli, data, scientific-data.
- [adios2](https://www.automicvault.com/pkg/brew/adios2/) - Shares av.db curated category or tags: cli, data, scientific-data.
- [base91](https://www.automicvault.com/pkg/brew/base91/) - Shares av.db curated category or tags: cli, data, data-format.

## Combined YAML source

View the package source record on GitHub. [combined/netcdf-cxx.yml](https://github.com/automic-vault/db/blob/main/combined/netcdf-cxx.yml)


## Sources

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