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

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

## 安装

```sh
sudo av install brew:node
```

## 代理安全回答

node executes JavaScript tooling that commonly reads project secrets and launches npm package workflows.

- **凭据访问:** Reads environment variables, dotenv files, npm tokens, and project config reachable to scripts.
- **远程变更:** Can run deploy scripts, API clients, and arbitrary package scripts.
- **发布/制品风险:** Can build and publish npm packages or generated application bundles.
- **推荐控制:** Gate package publishing and lifecycle scripts; scan project secrets before agent runs.
- **代理使用指南:** Allow test/build commands after scanning; require approval for publish, install scripts, and deploy actions.

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install node
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install nodejs24
```

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

### Linux

- apk (92%):

```sh
sudo apk add nodejs
```

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

- Debian apt (92%):

```sh
sudo apt install nodejs
```

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

- dnf (92%):

```sh
sudo dnf install nodejs
```

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

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

- pacman (92%):

```sh
sudo pacman -S nodejs
```

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

- zypper (92%):

```sh
sudo zypper install nodejs24
```

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

### Windows

- Chocolatey (92%):

```sh
choco install nodejs
```

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

- Scoop (92%):

```sh
scoop install main/nodejs
```

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

- winget (92%):

```sh
winget install --id OpenJS.NodeJS -e
```

  证据: Windows Package Manager source index: OpenJS.NodeJS from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:node
- **软件包管理器:** Homebrew
- **版本:** 26.5.1
- **来源摘要:** Open-source, cross-platform JavaScript runtime environment
- **主页:** <https://nodejs.org/>
- **仓库:** <https://github.com/nodejs/node>
- **最后更新:** 2026-07-31T17:47:51Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- node (别名)
- npm (别名)
- npx (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

Node.js is the JavaScript runtime that made server-side and command-line JavaScript mainstream. The official Node.js about page describes it as an asynchronous event-driven runtime designed for scalable network applications, with HTTP as a first-class feature and an event loop hidden behind ordinary JavaScript program execution.

### 项目历史

Ryan Dahl created Node.js around 2009 to run JavaScript outside the browser for network servers and other I/O-heavy programs. The runtime combined Google's V8 JavaScript engine with an event loop and low-level I/O APIs, giving web developers a single language across browser code, servers, tooling, and package scripts.

The early project was stewarded by Joyent, then hit a governance crisis in 2014 when prominent contributors forked it as io.js. The Node.js Foundation announced on 14 September 2015 that Node.js v4.0.0 combined the Node.js and io.js codebases under the foundation, added a long-term support plan, and moved the project to regular semver-based release lines.

The Node.js Foundation and JS Foundation announced their merger into the OpenJS Foundation on 12 March 2019. That put Node.js under the broader vendor-neutral JavaScript foundation that also houses projects such as Node-RED.

### 采用历史

Node.js adoption grew because it solved several developer and operational needs at once: fast startup for scripts, non-blocking network servers, JSON-native APIs, a giant npm ecosystem, and one language for browser and server teams. The 2015 foundation announcement said Node.js was used by tens of thousands of organizations in more than 200 countries and had more than 2 million downloads per month.

Homebrew's `node` formula is the rolling mainstream macOS/Linux package for the latest Node major. The Formulae page lists aliases including `node.js`, `node@26`, `nodejs`, and `npm`, and reports 3,116,013 installs over 365 days with 2,515,719 installs on request. Within Homebrew, that makes it the high-volume default path for developers who want Node, npm, and npx without a separate version manager.

### 使用方式

Homebrew users install the rolling formula with `brew install node`, then get `node`, `npm`, and `npx`. The formula is convenient for system-level CLI tools, local development, and build dependencies, while teams that need exact per-project versions often layer nvm, fnm, asdf, volta, nodenv, or Homebrew's versioned `node@` formulas on top of that ecosystem.

Package nerds care about Node's release train because C++ addons, ESM/CommonJS behavior, OpenSSL, V8, npm, Corepack, test runner behavior, and web-platform APIs can all change across majors. The official release page explains that major versions historically enter Current for six months, even-numbered releases become LTS, and production applications should use Active LTS or Maintenance LTS releases.

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

For package-manager data, `brew:node` is the anchor package. It is both a runtime and a build input for huge parts of the JavaScript, frontend, Electron, language-server, and CLI-tooling worlds. Its adoption stats often reflect not only developers explicitly wanting Node, but also downstream packages whose builds or runtime scripts need Node available.

### 时间线

- 2009: Ryan Dahl creates Node.js and presents the early runtime publicly.
- 2014: io.js fork forms during the Node.js governance dispute.
- 2015-09-14: Node.js v4.0.0 reunifies Node.js and io.js under the Node.js Foundation and introduces the modern LTS direction.
- 2019-03-12: Node.js Foundation and JS Foundation announce the OpenJS Foundation merger.
- 2026: Homebrew's rolling `node` formula tracks Node 26.x and lists node@24, node@22, node@20, and node@18 as adjacent versioned formulas.

### Related projects

- npm
- npx
- Corepack
- V8
- libuv
- OpenJS Foundation
- io.js

### 来源

- <https://formulae.brew.sh/formula/node>
- <https://nodejs.org/en/about>
- <https://nodejs.org/en/about/previous-releases>
- <https://nodejs.org/en/blog/announcements/foundation-v4-announce>
- <https://www.linuxfoundation.org/press/press-release/node-js-foundation-and-js-foundation-merge-to-form-openjs-foundation>
- <https://www.wired.com/2015/02/nodejs-foundation>


## 安全说明

doc example: JavaScript runtime and package ecosystem.

- **Geiger 风险:** yellow / 高
- doc example: JavaScript runtime and package ecosystem
- **审批门规则:** 7


## 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: ~/.npmrc
- Windows: %UserProfile%\.npmrc

## Credential files

- Unix: ~/.npmrc
- Windows: %UserProfile%\.npmrc
## 其他软件包管理器记录

- Debian apt - nodejs - 20.19.2+dfsg-1+deb13u2: normalized package name match | Debian stable package indexes: nodejs from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | evented I/O for V8 javascript - runtime executable | https://nodejs.org/
- Nix - nodejs: normalized package name match | nixpkgs package indexes: nodejs from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - nodejs - 18.19.1+dfsg-6ubuntu5: normalized package name match | Ubuntu 24.04 LTS package indexes: nodejs from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | evented I/O for V8 javascript - runtime executable | https://nodejs.org/
- apk - nodejs - 24.18.1-r0: normalized package name match | Alpine Linux edge package indexes: nodejs from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | JavaScript runtime built on V8 engine - LTS version | https://nodejs.org/
- dnf - nodejs - 22.23.1-4.fc45: normalized package name match | Fedora Rawhide package metadata: nodejs from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Node.js JavaScript runtime – rolling stream | https://nodejs.org
- dnf - nodejs24 - 24.18.0-4.fc45: normalized package name match | Fedora Rawhide package metadata: nodejs24 from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | JavaScript runtime | https://nodejs.org
- pacman - nodejs - 26.5.1-1: normalized package name match | Arch Linux sync databases: nodejs from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Evented I/O for V8 javascript ("Current" release) | https://nodejs.org/
- zypper - nodejs24 - 24.18.0-1.2: normalized package name match | openSUSE Tumbleweed package metadata: nodejs24 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Evented I/O for V8 JavaScript | https://nodejs.org
- MacPorts - nodejs24: normalized package name match | MacPorts ports tree: lang/nodejs24/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - nodejs: normalized package name match | Chocolatey community package catalog: nodejs from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','netfx-4.7.1-devpack'
- Scoop - main/nodejs: normalized package name match | Scoop official bucket manifest trees: bucket/nodejs.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - OpenJS.NodeJS: normalized package name match | Windows Package Manager source index: OpenJS.NodeJS from https://cdn.winget.microsoft.com/cache/source.msix
- Debian apt - npm - 9.2.0~ds1-3: installed executable or alias match | Debian stable package indexes: npm from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | package manager for Node.js | https://docs.npmjs.com/
- Ubuntu apt - npm - 9.2.0~ds1-2: installed executable or alias match | Ubuntu 24.04 LTS package indexes: npm from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | package manager for Node.js | https://docs.npmjs.com/
- apk - npm - 11.17.0-r0: installed executable or alias match | Alpine Linux edge package indexes: npm from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | The package manager for JavaScript | https://www.npmjs.com/
- apk - npm-bash-completion - 11.17.0-r0: installed executable or alias match | Alpine Linux edge package indexes: npm-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Bash completions for npm | https://www.npmjs.com/


## Combined YAML source

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


## 来源

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