# 使用 Homebrew, dnf, MacPorts, scoop, Nix 安装 solidity

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

## 安装

```sh
sudo av install brew:solidity
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install solidity
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install solidity
```

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

### Linux

- dnf (92%):

```sh
sudo dnf install solidity
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#solc
```

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

### Windows

- Scoop (92%):

```sh
scoop install main/solidity
```

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

## 软件包事实

- **软件包键:** brew:solidity
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/solidity>
- **版本:** 0.8.36
- **来源摘要:** Contract-oriented programming language
- **主页:** <https://soliditylang.org>
- **仓库:** <https://github.com/argotorg/solidity>
- **上游文档:** <https://soliditylang.org>
- **许可证:** GPL-3.0-or-later AND MIT AND BSD-3-Clause AND Apache-2.0 AND CC0-1.0
- **源码归档:** <https://github.com/argotorg/solidity/releases/download/v0.8.36/solidity_0.8.36.tar.gz>
- **最后更新:** 2026-07-09T11:51:48Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- solc (cli)
- yul-phaser (cli)
- solc (别名)
- yul-phaser (别名)

## 依赖

- boost
- z3

## 构建依赖

- cmake
- fmt
- nlohmann-json
- range-v3

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.8.36
- 管理器更新时间: 2026-07-09
- 本地数据: OK
- 上游仓库: https://github.com/argotorg/solidity
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

Solidity is the contract-oriented programming language and compiler toolchain used to write smart contracts for the Ethereum Virtual Machine. In package-manager culture, the `solc` command is the important artifact.

### 项目历史

The official repository README describes Solidity as a statically typed, contract-oriented, high-level language for implementing smart contracts on Ethereum. The docs describe it as a curly-bracket language influenced mainly by C++, with some earlier JavaScript influence reduced from version 0.4.0.

The official changelog records the 0.1.0 release in 2015, 0.4.0 in 2016, 0.5.0 in 2018, 0.6.0 in 2019, 0.7.0 in 2020, and 0.8.0 in 2020. The project remains in the 0.x version series and the README explains that breaking changes, new features, and bug fixes arrive regularly.

### 采用历史

Solidity became a core package in Ethereum developer environments because smart-contract projects need a specific compiler to match source pragmas and audit expectations. The supplied package-manager facts list Homebrew, Fedora/dnf, MacPorts, Nix, and Scoop packaging.

The official installation docs reflect this broad packaging story: they cover npm/Node.js `solcjs`, Docker images, static binaries, Homebrew, source builds, and the official compiler binary repository.

### 使用方式

Developers use `solc` directly for command-line compilation, often in larger contract projects or where compiler options matter, and can also use `solc --standard-json` for tool integration. The docs distinguish the full `solc` compiler from `solcjs`, whose command-line options are not compatible with `solc`.

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

Solidity is significant for package maintainers because compiler reproducibility is part of contract security. Old projects may require old compiler versions, current projects may need the newest bug fixes, and package managers must decide whether to ship one moving compiler, versioned formulae, static binaries, or external shims such as solc-select.

### 时间线

- 2015: Solidity 0.1.0 appears in the official changelog.
- 2016: Solidity 0.4.0 is released, including version pragmas.
- 2018: Solidity 0.5.0 is released.
- 2019: Solidity 0.6.0 is released.
- 2020: Solidity 0.7.0 and 0.8.0 are released.
- 2026: Solidity 0.8.35 is recorded in the official changelog.

### Related projects

- solc-js is derived from the C++ compiler via Emscripten. solc-bin provides official static compiler builds. solc-select uses Solidity's official binary distribution to switch compiler versions.

### 来源

- Input package-manager facts: source_facts.package-manager
- Official README: https://github.com/argotorg/solidity
- Official changelog: https://github.com/argotorg/solidity/blob/develop/Changelog.md
- Official docs: https://docs.soliditylang.org/
- Official installing docs: https://docs.soliditylang.org/en/latest/installing-solidity.html
- Official language influences docs: https://docs.soliditylang.org/en/latest/language-influences.html


## 安全说明

generalized runtime or code generation signal.

- **Geiger 风险:** yellow / 中
- generalized runtime or code generation signal

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** solidity
- **Version Scheme:** 0
- **Revision:** 0
- **Conflicts With:** solc-select
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

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

- dnf - solidity - 0.8.36-2.fc45: normalized package name match | Fedora Rawhide package metadata: solidity from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Object-oriented, high-level language for implementing smart contracts | https://soliditylang.org/
- MacPorts - solidity: normalized package name match | MacPorts ports tree: lang/solidity/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/solidity: normalized package name match | Scoop official bucket manifest trees: bucket/solidity.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- Nix - solc: installed executable or alias match | nixpkgs package indexes: pkgs/by-name/so/solc/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## 相关链接

- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://pkg.so/zh-hans/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [z3](https://pkg.so/zh-hans/brew/z3/) - Runtime dependency declared by Homebrew.
- [cmake](https://pkg.so/zh-hans/brew/cmake/) - Build dependency declared by Homebrew.
- [go](https://pkg.so/zh-hans/brew/go/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime.
- [gcc](https://pkg.so/zh-hans/brew/gcc/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime.
- [openjdk](https://pkg.so/zh-hans/brew/openjdk/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime.
- [rust](https://pkg.so/zh-hans/brew/rust/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime.
- [openjdk@17](https://pkg.so/zh-hans/brew/openjdk-17/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime.
- [openjdk@21](https://pkg.so/zh-hans/brew/openjdk-21/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime.
- [lua](https://pkg.so/zh-hans/brew/lua/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime.
- [openjdk@11](https://pkg.so/zh-hans/brew/openjdk-11/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime.
- [cadence](https://pkg.so/zh-hans/brew/cadence/) - Local package facts share a topical domain. Shared terms: cli, contract, contracts, language, language-runtime.
- [fantom](https://pkg.so/zh-hans/brew/fantom/) - Local package facts share a topical domain. Shared terms: cli, compiler, language, language-runtime, oriented.
- [inko](https://pkg.so/zh-hans/brew/inko/) - Local package facts share a topical domain. Shared terms: cli, compiler, language, language-runtime, oriented.

## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
