# Install gmp-ecm with Homebrew, apt, dnf, MacPorts, pacman, zypper, Nix

Elliptic Curve Method for integer factorization. Version 7.0.7 via Homebrew; verified 2026-06-07.

## Install

```sh
sudo av install brew:gmp-ecm
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install gmp-ecm
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install gmp-ecm
```

  Evidence: MacPorts ports tree: math/gmp-ecm/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install gmp-ecm
```

  Evidence: Debian stable package indexes: gmp-ecm from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install gmp-ecm
```

  Evidence: Fedora Rawhide package metadata: gmp-ecm 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 gmp-ecm
```

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

- zypper (92%):

```sh
sudo zypper install gmp-ecm
```

  Evidence: openSUSE Tumbleweed package metadata: gmp-ecm from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#ecm
```

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

## Package facts

- **Package key:** brew:gmp-ecm
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/gmp-ecm>
- **Version:** 7.0.7
- **Source summary:** Elliptic Curve Method for integer factorization
- **Homepage:** <https://gitlab.inria.fr/zimmerma/ecm>
- **Repository:** <https://gitlab.inria.fr/zimmerma/ecm>
- **Upstream docs:** <https://gitlab.inria.fr/zimmerma/ecm>
- **License:** GPL-3.0-or-later AND LGPL-3.0-or-later
- **Source archive:** <https://gitlab.inria.fr/zimmerma/ecm/-/archive/git-7.0.7/ecm-git-7.0.7.tar.gz>
- **Last updated:** 2026-06-07T12:56:09Z
- **Generated:** 2026-07-08T18:08:21+00:00

## Executables

- ecm (cli)
- ecm (alias)

## Dependencies

- gmp
- libomp
- primesieve

## Build dependencies

- autoconf
- automake
- libtool

## Install behavior

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

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 7.0.7
- Package-manager updated: 2026-06-07
- Local data: ok
- Upstream repository: https://gitlab.inria.fr/zimmerma/ecm
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

GMP-ECM is a command-line program and library for integer factorization using the elliptic curve method, with support for P-1 and P+1 methods. It is a specialist number-theory tool built on GMP and used when practitioners need to search for medium-sized factors of large composites.

### Project history

The project originates with Paul Zimmermann, listed in the AUTHORS file as the author of the first version. The codebase later moved to INRIA GitLab, and the bundled README notes that the older README text predates that move.

Over time GMP-ECM accumulated both command-line and library interfaces. README.lib documents ecm_factor, ecm_init, and ecm_clear for applications linking against libecm, while the main README documents ecm as a stdin-driven factoring command using B1 and B2 bounds.

The NEWS file records long-running engineering work: new P-1 and P+1 stage 2 algorithms in the 6.2 series, GPL/LGPL licensing adjustment in 6.4.1, thread safety and GPU stage-1 code in 7.0, and portability fixes through the 7.0.7 release line.

### Adoption history

GMP-ECM is packaged across Homebrew, Debian, Fedora, MacPorts, Nix, Arch, Ubuntu, and openSUSE families in the batch metadata. That spread reflects its role as a reusable scientific computing component rather than a general desktop application.

The AUTHORS file shows contributions from number-theory and high-performance arithmetic specialists, including work on batch mode, GPU code, Visual C builds, expression parsing, primality testing tools, NTT code, and assembly optimizations.

### How it is used

Practitioners feed one composite number per line to ecm and choose a stage-1 bound B1, with an optional B2. The README examples cover one-curve ECM runs, multiple curves with -c, P-1 with -pm1, P+1 with -pp1, save/resume workflows, and expression syntax such as powers and Fermat-number forms.

Library users include ecm.h and link against libecm to call ecm_factor from their own factoring software. That split lets package managers install both a CLI for interactive factor hunting and a library for larger systems.

### Why package nerds care

GMP-ECM matters in packaging because it is the canonical small tool behind a very specific algorithmic niche. A distro package gives researchers and computational-number-theory users the same tuned implementation without rebuilding GMP-linked arithmetic code by hand.

Its history is also a reminder that scientific packages often expose both an executable and a library ABI; the package is not merely an end-user command but part of the factoring stack used by other tools.

### Timeline

- 2008: Stage 2 improvements for P-1 and P+1 described in the ANTS-VIII paper referenced by NEWS.
- 2012: Version 6.4.1 licensing changed to GPL-3-or-later for the binary and LGPL-3-or-later for the library.
- 2020: Public INRIA GitLab project created after earlier hosting.
- 2026: Version 7.0.7 tag committed with MacOS fixes and mmap batch-data support.

### Related projects

- GMP supplies the multiprecision arithmetic foundation.
- P-1, P+1, MPQS, and NFS are related factoring methods discussed in the README's guidance.

### Sources

- <https://gitlab.inria.fr/api/v4/projects/zimmerma%2Fecm>
- <https://gitlab.inria.fr/zimmerma/ecm>
- <https://gitlab.inria.fr/zimmerma/ecm/-/raw/master/AUTHORS>
- <https://gitlab.inria.fr/zimmerma/ecm/-/raw/master/NEWS>
- <https://gitlab.inria.fr/zimmerma/ecm/-/raw/master/README>
- <https://gitlab.inria.fr/zimmerma/ecm/-/raw/master/README.lib>


## Security Notes

No matching local secret-handling manifest was found for gmp-ecm. Nucleus package metadata is still published here so future coverage has a stable package URL.


## Source Database Details

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

## Other Package-Manager Records

- Debian apt - gmp-ecm - 7.0.6+ds-1: normalized package name match | Debian stable package indexes: gmp-ecm from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Factor integers using the Elliptic Curve Method | https://gitlab.inria.fr/zimmerma/ecm
- Debian apt - libecm-dev - 7.0.6+ds-1: normalized package name match | Debian stable package indexes: libecm-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | dummy package | https://gitlab.inria.fr/zimmerma/ecm
- Debian apt - libecm1 - 7.0.6+ds-1: normalized package name match | Debian stable package indexes: libecm1 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | factor integers using the Elliptic Curve Method -- lib | https://gitlab.inria.fr/zimmerma/ecm
- Debian apt - libecm1-dev - 7.0.6+ds-1: normalized package name match | Debian stable package indexes: libecm1-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | factor integers using the Elliptic Curve Method -- libdev | https://gitlab.inria.fr/zimmerma/ecm
- Debian apt - libecm1-dev-common - 7.0.6+ds-1: normalized package name match | Debian stable package indexes: libecm1-dev-common from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | factor integers using the Elliptic Curve Method -- header | https://gitlab.inria.fr/zimmerma/ecm
- Ubuntu apt - gmp-ecm - 7.0.5+ds-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: gmp-ecm from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Factor integers using the Elliptic Curve Method | https://gitlab.inria.fr/zimmerma/ecm
- Ubuntu apt - libecm-dev - 7.0.5+ds-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libecm-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | dummy package | https://gitlab.inria.fr/zimmerma/ecm
- Ubuntu apt - libecm1 - 7.0.5+ds-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libecm1 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | factor integers using the Elliptic Curve Method -- lib | https://gitlab.inria.fr/zimmerma/ecm
- Ubuntu apt - libecm1-dev - 7.0.5+ds-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libecm1-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | factor integers using the Elliptic Curve Method -- libdev | https://gitlab.inria.fr/zimmerma/ecm
- Ubuntu apt - libecm1-dev-common - 7.0.5+ds-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libecm1-dev-common from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | factor integers using the Elliptic Curve Method -- header | https://gitlab.inria.fr/zimmerma/ecm
- dnf - gmp-ecm - 7.0.7-1.fc45: normalized package name match | Fedora Rawhide package metadata: gmp-ecm from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Elliptic Curve Method for Integer Factorization | https://gitlab.inria.fr/zimmerma/ecm
- dnf - gmp-ecm-devel - 7.0.7-1.fc45: normalized package name match | Fedora Rawhide package metadata: gmp-ecm-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Files useful for gmp-ecm development | https://gitlab.inria.fr/zimmerma/ecm
- dnf - gmp-ecm-libs - 7.0.7-1.fc45: normalized package name match | Fedora Rawhide package metadata: gmp-ecm-libs from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Elliptic Curve Method library | https://gitlab.inria.fr/zimmerma/ecm
- pacman - gmp-ecm - 7.0.7-2: normalized package name match | Arch Linux sync databases: gmp-ecm from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Elliptic Curve Method for Integer Factorization | https://github.com/sethtroisi/gmp-ecm
- zypper - gmp-ecm - 7.0.5-1.10: normalized package name match | openSUSE Tumbleweed package metadata: gmp-ecm from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Elliptic Curve Method for Integer Factorization | https://gitlab.inria.fr/zimmerma/ecm
- zypper - gmp-ecm-devel - 7.0.5-1.10: normalized package name match | openSUSE Tumbleweed package metadata: gmp-ecm-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Development files for the gmp-ecm package | https://gitlab.inria.fr/zimmerma/ecm


## Related links

- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://www.automicvault.com/pkg/brew-utility-packages/) - Matched curated package taxonomy and local package facts.
- [primesieve](https://www.automicvault.com/pkg/brew/primesieve/) - Runtime dependency declared by Homebrew.
- [autoconf](https://www.automicvault.com/pkg/brew/autoconf/) - Build dependency declared by Homebrew.
- [automake](https://www.automicvault.com/pkg/brew/automake/) - Build dependency declared by Homebrew.
- [libtool](https://www.automicvault.com/pkg/brew/libtool/) - Build dependency declared by Homebrew.
- [sollya](https://www.automicvault.com/pkg/brew/sollya/) - Local package facts share a topical domain. Shared terms: gmp.
- [msieve](https://www.automicvault.com/pkg/brew/msieve/) - Local package facts share a topical domain. Shared terms: factorization, gmp, integer.
- [cddlib](https://www.automicvault.com/pkg/brew/cddlib/) - Local package facts share a topical domain. Shared terms: gmp, method.

## Combined YAML source

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


## Sources

- Nucleus package database
- package-page enrichment
- curated package history
- package version freshness
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
