# 使用 Homebrew, chocolatey, MacPorts, pacman, scoop 安装 nvm

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

## 安装

```sh
sudo av install brew:nvm
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install nvm
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install nvm
```

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

### Linux

- pacman (92%):

```sh
sudo pacman -S nvm
```

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

### Windows

- Chocolatey (92%):

```sh
choco install nvm
```

  证据: Chocolatey community package catalog: nvm from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','nordvpn-teams'

- Scoop (92%):

```sh
scoop install main/nvm
```

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

## 软件包事实

- **软件包键:** brew:nvm
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/nvm>
- **版本:** 0.40.6
- **来源摘要:** Manage multiple Node.js versions
- **主页:** <https://github.com/nvm-sh/nvm>
- **仓库:** <https://github.com/nvm-sh/nvm>
- **许可证:** MIT
- **源码归档:** <https://github.com/nvm-sh/nvm/archive/refs/tags/v0.40.6.tar.gz>
- **最后更新:** 2026-07-16T00:53:37Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 安装行为

- post-install 钩子: 未定义
- 注意事项: Please note that upstream has asked us to make explicit managing nvm via Homebrew is unsupported by them and you should check any problems against the standard nvm install method prior to reporting. You should create NVM's working directory if it doesn't exist: mkdir ~/.nvm Add the following to your shell profile e.g. ~/.profile or ~/.zshrc: export NVM_DIR="$HOME/.nvm" [ -s "$HOMEBREW_PREFIX/opt/nvm/nvm.sh" ] && \. "$HOMEBREW_PREFIX/opt/nvm/nvm.sh" # This loads nvm [ -s "$HOMEBREW_PREFIX/opt/nvm/etc/bash_completion.d/nvm" ] && \. "$HOMEBREW_PREFIX/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion You can set $NVM_DIR to any location, but leaving it unchanged from $HOMEBREW_CELLAR/nvm/0.40.6 will destroy any nvm-installed Node installations upon upgrade/reinstall. Type `nvm help` for further information.
- Bottle: 可用 于 all

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.40.6
- 管理器更新时间: 2026-07-16
- 本地数据: OK
- 上游仓库: https://github.com/nvm-sh/nvm
- 检测到的最新版本: v0.40.6 (当前)

## 安全说明

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


## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** nvm
- **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

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

- pacman - nvm - 0.40.5-1: normalized package name match | Arch Linux sync databases: nvm from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Node Version Manager - Simple bash script to manage multiple active node.js versions | https://github.com/nvm-sh/nvm
- MacPorts - nvm: normalized package name match | MacPorts ports tree: devel/nvm/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - nvm: normalized package name match | Chocolatey community package catalog: nvm from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','nordvpn-teams'
- Scoop - main/nvm: normalized package name match | Scoop official bucket manifest trees: bucket/nvm.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Language runtime packages](https://pkg.so/zh-hans/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Web development packages](https://pkg.so/zh-hans/web-dev-tools/) - Matched web development metadata.
- [n](https://pkg.so/zh-hans/npm/n/) - Both packages touch the same language runtime or ecosystem. Shared terms: manage, node, nvm, versions.
- [solc-select](https://pkg.so/zh-hans/brew/solc-select/) - Local package facts share a topical domain. Shared terms: manage, multiple, versions.
- [nvs](https://pkg.so/zh-hans/cask/nvs/) - Both packages touch the same language runtime or ecosystem. Shared terms: node, node-js, versions.

## 来源

- pkg.so package database
- package-page enrichment
- package version freshness
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
