# 使用 Homebrew, apk, chocolatey, apt, dnf, MacPorts, Nix, pacman, zypper, scoop 安装 ngspice

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

## 安装

```sh
sudo av install brew:ngspice
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install ngspice
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install ngspice
```

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

### Linux

- apk (92%):

```sh
sudo apk add ngspice
```

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

- Debian apt (92%):

```sh
sudo apt install ngspice
```

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

- dnf (92%):

```sh
sudo dnf install ngspice
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#ngspice
```

  证据: nixpkgs package indexes: ngspice from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- pacman (92%):

```sh
sudo pacman -S ngspice
```

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

- zypper (92%):

```sh
sudo zypper install ngspice
```

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

### Windows

- Chocolatey (92%):

```sh
choco install ngspice
```

  证据: Chocolatey community package catalog: ngspice from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='8.412399','intellijidea-edu'

- Scoop (92%):

```sh
scoop install extras/ngspice
```

  证据: Scoop official bucket manifest trees: bucket/ngspice.json from https://api.github.com/repos/ScoopInstaller/Extras/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:ngspice
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/ngspice>
- **版本:** 46
- **来源摘要:** Spice circuit simulator
- **主页:** <https://ngspice.sourceforge.io/>
- **仓库:** <https://sourceforge.net/p/ngspice/ngspice/ci/master/tree>
- **上游文档:** <https://ngspice.sourceforge.io/docs.html>
- **许可证:** LicenseRef-Homebrew-cannot-represent
- **源码归档:** <https://downloads.sourceforge.net/project/ngspice/ng-spice-rework/46/ngspice-46.tar.gz>
- **最后更新:** 2026-06-25T13:37:57+02:00
- **已生成:** 2026-07-10T07:20:53+00:00

## 可执行文件

- ngspice (cli)
- ngspice (别名)

## 依赖

- fftw
- freetype
- libice
- libngspice
- libsm
- libx11
- libxaw
- libxext
- libxmu
- libxt
- readline

## macOS 提供的库

- ncurses

## 安装行为

- post-install 钩子: 未定义
- 注意事项: If you need the graphical plotting functions you need to install X11 with: brew install --cask xquartz
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-07-10
- 管理器版本: 46
- 管理器更新时间: 2026-06-25
- 本地数据: OK
- 上游仓库: https://ngspice.sourceforge.io/
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

ngspice is the open-source continuation of the Berkeley SPICE circuit-simulation lineage. It is a command-line and library-capable simulator for analog, digital, mixed-signal, and mixed-level electronic circuits, with a long release history and broad packaging across Unix-like systems, Windows channels, and EDA workflows.

### 项目历史

The ngspice manual says the project is an update of Spice3f5, the last Berkeley release of the Spice3 simulator family, developed to add features and fix bugs. The same manual describes the project as assembled from Spice3f5, XSPICE, CIDER, and original ngspice material, with Paolo Nenzi's first manual preface dated March 24, 2001.

The project inherited Spice3 and CIDER from the University of California at Berkeley and XSPICE from Georgia Tech. Its early 2000s 'ng-spice-rework' releases show the transition from cleanup and bug fixing into a simulator with XSPICE mixed-signal support, CIDER mixed-level simulation, model updates, Windows/MINGW support, and broader portability.

Release 46 was distributed in March 2026; the version 46 manual is dated March 31, 2026. The SourceForge download page listed ngspice-46 as the latest release, and Homebrew packaged stable version 46 from SourceForge.

### 采用历史

ngspice is the significant package in this batch. It is packaged by Homebrew, MacPorts, Debian/Ubuntu, Fedora, Arch, Nix, openSUSE, Chocolatey, Scoop, and Alpine-family repositories in the av.db input. Homebrew analytics on July 1, 2026 reported 2,500 install-on-request events over 365 days, and SourceForge showed weekly downloads for release 46 and old releases.

Its adoption is helped by compatibility rather than novelty. The project advertises SPICE compatibility, support for PSPICE/LTSPICE model parameters and netlists for discrete circuits, HSPICE device libraries from foundry PDKs for integrated circuits, and third-party schematic/simulation front ends. That makes it a common open simulation engine under GUI and scripted EDA workflows.

### 使用方式

The normal package-nerd use is to install `ngspice`, feed it a SPICE netlist from the command line, run DC, AC, transient, noise, pole-zero, sensitivity, distortion, S-parameter, or mixed-signal analyses, and inspect plots or raw output files. More advanced users build it as a shared library or integrate it through tools such as KiCad, Xschem, Qucs-S, PySpice, or Tcl/Tk-related tooling.

The practical reason people care about the package is that it is the free, scriptable SPICE engine that package managers can ship everywhere. It sits in a lineage older than most package ecosystems, but remains active because open PDKs, Verilog-A/OpenVAF model loading, mixed-signal code models, and simulator-library embedding keep generating new use cases.

### 时间线

- {'date': '2000-11-04', 'event': 'ng-spice-rework-13 release listed enhancements and bug fixes.'}
- {'date': '2001-03-24', 'event': 'Paolo Nenzi dated the first ngspice manual preface.'}
- {'date': '2004-01-27', 'event': 'ng-spice-rework-15 incorporated XSPICE, CIDER, numparam, model updates, and examples.'}
- {'date': '2026-03-31', 'event': 'Version 46 manual date.'}

### Related projects

- Berkeley SPICE
- Spice3f5
- XSPICE
- CIDER
- KiCad
- Xschem
- Qucs-S
- PySpice
- OpenVAF

### 来源

- <https://formulae.brew.sh/api/formula/ngspice.json>
- <https://ngspice.sourceforge.io/>
- <https://ngspice.sourceforge.io/docs/ngspice-manual.pdf>
- <https://ngspice.sourceforge.io/relinfo.html>
- <https://sourceforge.net/projects/ngspice/files/ng-spice-rework/>


## 安全说明

narrow executable package without higher-risk signals.

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

## 源数据库详情

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

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

- Debian apt - libngspice0 - 44.2+ds-1: normalized package name match | Debian stable package indexes: libngspice0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Spice circuit simulator - library | https://ngspice.sourceforge.io
- Debian apt - libngspice0-dev - 44.2+ds-1: normalized package name match | Debian stable package indexes: libngspice0-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Spice circuit simulator - development files for libngspice | https://ngspice.sourceforge.io
- Debian apt - ngspice - 44.2+ds-1: normalized package name match | Debian stable package indexes: ngspice from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Spice circuit simulator | https://ngspice.sourceforge.io
- Debian apt - ngspice-dev - 44.2+ds-1: normalized package name match | Debian stable package indexes: ngspice-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Spice circuit simulator - development files for ngspice and tclspice | https://ngspice.sourceforge.io
- Debian apt - ngspice-doc - 44.2+ds-1: normalized package name match | Debian stable package indexes: ngspice-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Documentation for the NGspice circuit simulator | https://ngspice.sourceforge.io
- Debian apt - tclspice - 44.2+ds-1: normalized package name match | Debian stable package indexes: tclspice from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | NGSpice library for Tcl | https://ngspice.sourceforge.io
- Nix - ngspice: normalized package name match | nixpkgs package indexes: ngspice from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - libngspice0 - 42+ds-3build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libngspice0 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Spice circuit simulator - library | https://ngspice.sourceforge.io
- Ubuntu apt - libngspice0-dev - 42+ds-3build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libngspice0-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Spice circuit simulator - development files for libngspice | https://ngspice.sourceforge.io
- Ubuntu apt - ngspice - 42+ds-3build1: normalized package name match | Ubuntu 24.04 LTS package indexes: ngspice from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Spice circuit simulator | https://ngspice.sourceforge.io
- Ubuntu apt - ngspice-dev - 42+ds-3build1: normalized package name match | Ubuntu 24.04 LTS package indexes: ngspice-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Spice circuit simulator - development files for ngspice and tclspice | https://ngspice.sourceforge.io
- Ubuntu apt - ngspice-doc - 42+ds-3build1: normalized package name match | Ubuntu 24.04 LTS package indexes: ngspice-doc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Documentation for the NGspice circuit simulator | https://ngspice.sourceforge.io
- Ubuntu apt - tclspice - 42+ds-3build1: normalized package name match | Ubuntu 24.04 LTS package indexes: tclspice from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | NGSpice library for Tcl | https://ngspice.sourceforge.io
- apk - ngspice - 46-r0: normalized package name match | Alpine Linux edge package indexes: ngspice from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | open source spice simulator for electric and electronic circuits | https://ngspice.sourceforge.net/
- apk - ngspice-dev - 46-r0: normalized package name match | Alpine Linux edge package indexes: ngspice-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | open source spice simulator for electric and electronic circuits (development files) | https://ngspice.sourceforge.net/
- apk - ngspice-doc - 46-r0: normalized package name match | Alpine Linux edge package indexes: ngspice-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | open source spice simulator for electric and electronic circuits (documentation) | https://ngspice.sourceforge.net/


## 相关链接

- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Scientific computing packages](https://www.automicvault.com/zh-hans/pkg/scientific-computing-tools/) - Matched scientific computing metadata.
- [Homebrew utility packages](https://www.automicvault.com/zh-hans/pkg/brew-utility-packages/) - Matched Homebrew package provider.
- [fftw](https://www.automicvault.com/zh-hans/pkg/brew/fftw/) - Runtime dependency declared by Homebrew.
- [freetype](https://www.automicvault.com/zh-hans/pkg/brew/freetype/) - Runtime dependency declared by Homebrew.
- [cspice](https://www.automicvault.com/zh-hans/pkg/brew/cspice/) - Shares av.db curated category or tags: cli, science, spice.
- [aamath](https://www.automicvault.com/zh-hans/pkg/brew/aamath/) - Shares av.db curated category or tags: cli, science.
- [abpoa](https://www.automicvault.com/zh-hans/pkg/brew/abpoa/) - Shares av.db curated category or tags: cli, science.
- [abricate](https://www.automicvault.com/zh-hans/pkg/brew/abricate/) - Shares av.db curated category or tags: cli, science.
- [abyss](https://www.automicvault.com/zh-hans/pkg/brew/abyss/) - Shares av.db curated category or tags: cli, science.
- [acl2](https://www.automicvault.com/zh-hans/pkg/brew/acl2/) - Shares av.db curated category or tags: cli, science.
- [adapterremoval](https://www.automicvault.com/zh-hans/pkg/brew/adapterremoval/) - Shares av.db curated category or tags: cli, science.
- [admesh](https://www.automicvault.com/zh-hans/pkg/brew/admesh/) - Shares av.db curated category or tags: cli, science.
- [grace](https://www.automicvault.com/zh-hans/pkg/brew/grace/) - Local package facts share a topical domain. Shared terms: cli, fftw, libice, libsm, libx11.
- [gwyddion](https://www.automicvault.com/zh-hans/pkg/brew/gwyddion/) - Local package facts share a topical domain. Shared terms: cli, fftw, science.
- [spim](https://www.automicvault.com/zh-hans/pkg/brew/spim/) - Local package facts share a topical domain. Shared terms: cli, science, simulation, simulator.

## Combined YAML source

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


## 来源

- 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
