# 使用 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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
- **版本:** 0.8.36
- **来源摘要:** Contract-oriented programming language
- **主页:** <https://soliditylang.org>
- **仓库:** <https://github.com/argotorg/solidity>
- **最后更新:** 2026-07-09T11:51:48Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

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

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

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

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

- 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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


## 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
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
