# 使用 Homebrew, apt, dnf, MacPorts, Nix, pacman, zypper 安装 calc

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

## 安装

```sh
sudo av install brew:calc
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install calc
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install calc
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install calc
```

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

- dnf (92%):

```sh
sudo dnf install calc
```

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

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

- pacman (92%):

```sh
sudo pacman -S calc
```

  证据: Arch Linux sync databases: calc from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install calc
```

  证据: openSUSE Tumbleweed package metadata: calc from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:calc
- **软件包管理器:** Homebrew
- **版本:** 2.17.0.0
- **来源摘要:** Arbitrary precision calculator
- **主页:** <http://www.isthe.com/chongo/tech/comp/calc/>
- **仓库:** <https://github.com/lcn2/calc>
- **最后更新:** 2026-06-22T14:02:56-07:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- calc (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

calc is a long-running arbitrary-precision calculator with an interactive shell, a C-like expression language, exact rational arithmetic, complex numbers, and programmable functions. Its package history is unusually old-school: a Unix mathematical tool maintained through tarballs, mirrors, distro packages, and now GitHub releases.

### 项目历史

The official author page says most of calc was written by David I. Bell, with source and releases maintained by Landon Curt Noll, and credits Ernest W. Bowen plus others for numerical and help-file improvements. It also notes that portions derived from earlier public-domain arbitrary-precision routines posted to the net around 1984, though little recognizable code remained.

The official README presents calc as an interactive calculator that can also execute a single command from the shell. It supports huge integer arithmetic, exact fractions, complex numbers, transcendental functions, variables, loops, and user-defined functions in a C-like language.

The current CHANGES file shows active maintenance into the 2020s, including XDG Base Directory support and a 2026 2.17.0.0 line that synchronizes changes from the newer 3.0 work while keeping a legacy branch for very old systems.

### 采用历史

calc has been packaged broadly across Unix-like systems because it fills the gap between simple desk calculators, `bc`, and larger computer algebra systems. The repository README gives install examples for yum, pacman, apt, dnf, Termux, and source builds, matching its presence in many package managers.

Its adoption is strongest among users who want scriptable exact arithmetic without pulling in a full CAS. Landon Curt Noll's pages also connect calc scripts to large-prime and astronomical interests, a good example of how small Unix math tools become personal research infrastructure.

### 使用方式

Users run `calc` interactively, pass an expression as a command-line argument, or write scripts in calc's C-like language. Typical package-manager usage is installing the binary and then relying on it for precise integer, rational, modular, complex, and high-precision floating calculations.

The tool supports startup configuration through `calcrc` paths, with recent release notes documenting XDG Base Directory adoption alongside the older `~/.calcrc` convention.

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

calc matters to package nerds because it is a preserved lineage of pre-Git, pre-GitHub Unix numerics that still receives modern portability work. It is not just another calculator: it is a programmable arbitrary-precision environment small enough for base developer workflows.

It is also a reminder that package ecosystems carry historical software forward. The same package is at home in Debian, Fedora, Arch, Homebrew, MacPorts, Nix, Termux, and source tarballs, because the CLI contract has stayed useful for decades.

### 时间线

- 1984: Earlier public-domain arbitrary-precision routines were posted to the net, later influencing calc's ancestry.
- 1990s-2000s: calc circulated as source, binaries, and mirrored tarballs maintained by Landon Curt Noll.
- 2022: Official calc web pages point users to GitHub releases and the GitHub source repository.
- 2026: CHANGES documents calc 2.17.0.0 work, including C17 expectations, XDG Base Directory support, and a legacy branch for old systems.

### Related projects

- Related tools include `bc`, `dc`, GNU bc, PARI/GP, Python's decimal and fractions modules, Maxima, and small Unix math utilities. calc occupies the middle ground: scriptable and exact like `bc`, but with a richer C-like language and built-in math library.

### 来源

- <http://www.isthe.com/chongo/tech/comp/calc/calc-author.html>
- <http://www.isthe.com/chongo/tech/comp/calc/calc-whatis.html>
- <http://www.isthe.com/chongo/tech/comp/calc/index.html>
- <https://github.com/lcn2/calc/blob/master/CHANGES>
- <https://github.com/lcn2/calc/blob/master/README.md>


## 安全说明

没有找到 calc 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ${XDG_CONFIG_HOME:-$HOME/.config}/calc/calcrc, ~/.calcrc
## 其他软件包管理器记录

- Debian apt - calc - 2.15.1.0-1: normalized package name match | Debian stable package indexes: calc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Arbitrary precision calculator | http://www.isthe.com/chongo/tech/comp/calc/
- Debian apt - calc-common - 2.15.1.0-1: normalized package name match | Debian stable package indexes: calc-common from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Arbitrary precision calculator (common files) | http://www.isthe.com/chongo/tech/comp/calc/
- Debian apt - calc-dev - 2.15.1.0-1: normalized package name match | Debian stable package indexes: calc-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Library for arbitrary precision arithmetic | http://www.isthe.com/chongo/tech/comp/calc/
- Nix - calc: normalized package name match | nixpkgs package indexes: pkgs/by-name/ca/calc/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - calc - 2.15.0.4-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: calc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Arbitrary precision calculator | http://www.isthe.com/chongo/tech/comp/calc/
- Ubuntu apt - calc-common - 2.15.0.4-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: calc-common from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Arbitrary precision calculator (common files) | http://www.isthe.com/chongo/tech/comp/calc/
- Ubuntu apt - calc-dev - 2.15.0.4-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: calc-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Library for arbitrary precision arithmetic | http://www.isthe.com/chongo/tech/comp/calc/
- dnf - calc - 2.16.1.2-2.fc45: normalized package name match | Fedora Rawhide package metadata: calc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Arbitrary precision arithmetic system and calculator | http://isthe.com/chongo/tech/comp/calc/
- dnf - calc-devel - 2.16.1.2-2.fc45: normalized package name match | Fedora Rawhide package metadata: calc-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Development files for the calc arithmetic system | http://isthe.com/chongo/tech/comp/calc/
- dnf - calc-libs - 2.16.1.2-2.fc45: normalized package name match | Fedora Rawhide package metadata: calc-libs from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Libraries for the calc arithmetic system | http://isthe.com/chongo/tech/comp/calc/
- dnf - calc-stdrc - 2.16.1.2-2.fc45: normalized package name match | Fedora Rawhide package metadata: calc-stdrc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Standard resource files the calc arithmetic system | http://isthe.com/chongo/tech/comp/calc/
- pacman - calc - 2.17.0.0-1: normalized package name match | Arch Linux sync databases: calc from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Arbitrary precision console calculator | https://github.com/lcn2/calc
- zypper - calc - 2.17.0.0-1.2: normalized package name match | openSUSE Tumbleweed package metadata: calc from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | C-style arbitrary precision calculator | http://www.isthe.com/chongo/tech/comp/calc/index.html
- zypper - calc-devel - 2.17.0.0-1.2: normalized package name match | openSUSE Tumbleweed package metadata: calc-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Development files for libcalc | http://www.isthe.com/chongo/tech/comp/calc/index.html
- zypper - libcalc2_17_0_0 - 2.17.0.0-1.2: normalized package name match | openSUSE Tumbleweed package metadata: libcalc2_17_0_0 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Arbitrary precision math library | http://www.isthe.com/chongo/tech/comp/calc/index.html
- MacPorts - calc: normalized package name match | MacPorts ports tree: math/calc/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
