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

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

## 安装

```sh
sudo av install brew:llvm
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install llvm
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add llvm
```

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

- Debian apt (92%):

```sh
sudo apt install llvm
```

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

- dnf (92%):

```sh
sudo dnf install llvm
```

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

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

- pacman (92%):

```sh
sudo pacman -S llvm
```

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

- zypper (92%):

```sh
sudo zypper install llvm
```

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

### Windows

- Chocolatey (92%):

```sh
choco install llvm
```

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

- Scoop (92%):

```sh
scoop install main/llvm
```

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

- winget (92%):

```sh
winget install --id LLVM.LLVM -e
```

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

## 软件包事实

- **软件包键:** brew:llvm
- **软件包管理器:** Homebrew
- **版本:** 22.1.8
- **来源摘要:** Next-gen compiler infrastructure
- **主页:** <https://llvm.org/>
- **仓库:** <https://github.com/llvm/llvm-project>
- **最后更新:** 2026-08-01T07:56:08+01:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- FileCheck (别名)
- UnicodeNameMappingGenerator (别名)
- amdgpu-arch (别名)
- analyze-build (别名)
- bugpoint (别名)
- clang (别名)
- clang++ (别名)
- clang-22 (别名)
- clang-apply-replacements (别名)
- clang-change-namespace (别名)
- clang-check (别名)
- clang-cl (别名)
- clang-cpp (别名)
- clang-doc (别名)
- clang-extdef-mapping (别名)
- clang-format (别名)
- clang-include-cleaner (别名)
- clang-include-fixer (别名)
- clang-installapi (别名)
- clang-linker-wrapper (别名)
- clang-move (别名)
- clang-nvlink-wrapper (别名)
- clang-offload-bundler (别名)
- clang-offload-packager (别名)
- clang-query (别名)
- clang-refactor (别名)
- clang-reorder-fields (别名)
- clang-repl (别名)
- clang-scan-deps (别名)
- clang-sycl-linker (别名)
- clang-tblgen (别名)
- clang-tidy (别名)
- clangd (别名)
- count (别名)
- diagtool (别名)
- dsymutil (别名)
- find-all-symbols (别名)
- git-clang-format (别名)
- hmaptool (别名)
- intercept-build (别名)
- llc (别名)
- lldb (别名)
- lldb-argdumper (别名)
- lldb-dap (别名)
- lldb-instr (别名)
- lldb-mcp (别名)
- lldb-server (别名)
- lldb-tblgen (别名)
- lli (别名)
- lli-child-target (别名)
- llvm-PerfectShuffle (别名)
- llvm-addr2line (别名)
- llvm-ar (别名)
- llvm-as (别名)
- llvm-bcanalyzer (别名)
- llvm-bitcode-strip (别名)
- llvm-c-test (别名)
- llvm-cas (别名)
- llvm-cat (别名)
- llvm-cfi-verify (别名)
- llvm-cgdata (别名)
- llvm-config (别名)
- llvm-cov (别名)
- llvm-ctxprof-util (别名)
- llvm-cvtres (别名)
- llvm-cxxdump (别名)
- llvm-cxxfilt (别名)
- llvm-cxxmap (别名)
- llvm-debuginfo-analyzer (别名)
- llvm-debuginfod (别名)
- llvm-debuginfod-find (别名)
- llvm-diff (别名)
- llvm-dis (别名)
- llvm-dlltool (别名)
- llvm-dwarfdump (别名)
- llvm-dwarfutil (别名)
- llvm-dwp (别名)
- llvm-exegesis (别名)
- llvm-extract (别名)
- llvm-gsymutil (别名)
- llvm-ifs (别名)
- llvm-install-name-tool (别名)
- llvm-ir2vec (别名)
- llvm-jitlink (别名)
- llvm-jitlink-executor (别名)
- llvm-lib (别名)
- llvm-libtool-darwin (别名)
- llvm-link (别名)
- llvm-lipo (别名)
- llvm-lto (别名)
- llvm-lto2 (别名)
- llvm-mc (别名)
- llvm-mca (别名)
- llvm-ml (别名)
- llvm-ml64 (别名)
- llvm-modextract (别名)
- llvm-nm (别名)
- llvm-objcopy (别名)
- llvm-objdump (别名)
- llvm-offload-binary (别名)
- llvm-offload-wrapper (别名)
- llvm-opt-report (别名)
- llvm-otool (别名)
- llvm-pdbutil (别名)
- llvm-profdata (别名)
- llvm-profgen (别名)
- llvm-ranlib (别名)
- llvm-rc (别名)
- llvm-readelf (别名)
- llvm-readobj (别名)
- llvm-readtapi (别名)
- llvm-reduce (别名)
- llvm-remarkutil (别名)
- llvm-rtdyld (别名)
- llvm-sim (别名)
- llvm-size (别名)
- llvm-split (别名)
- llvm-stress (别名)
- llvm-strings (别名)
- llvm-strip (别名)
- llvm-symbolizer (别名)
- llvm-tblgen (别名)
- llvm-test-mustache-spec (别名)
- llvm-tli-checker (别名)
- llvm-undname (别名)
- llvm-windres (别名)
- llvm-xray (别名)
- mlir-cat (别名)
- mlir-linalg-ods-yaml-gen (别名)
- mlir-lsp-server (别名)
- mlir-minimal-opt (别名)
- mlir-minimal-opt-canonicalize (别名)
- mlir-opt (别名)
- mlir-pdll (别名)
- mlir-pdll-lsp-server (别名)
- mlir-query (别名)
- mlir-reduce (别名)
- mlir-rewrite (别名)
- mlir-runner (别名)
- mlir-tblgen (别名)
- mlir-transform-opt (别名)
- mlir-translate (别名)
- modularize (别名)
- not (别名)
- nvptx-arch (别名)
- obj2yaml (别名)
- offload-arch (别名)
- opt (别名)
- pp-trace (别名)
- reduce-chunk-list (别名)
- run-clang-tidy (别名)
- sancov (别名)
- sanstats (别名)
- scan-build (别名)
- scan-build-py (别名)
- scan-view (别名)
- split-file (别名)
- tblgen-lsp-server (别名)
- tblgen-to-irdl (别名)
- verify-uselistorder (别名)
- yaml-bench (别名)
- yaml2macho-core (别名)
- yaml2obj (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

LLVM is a modular compiler and toolchain infrastructure project packaged by Homebrew as the current llvm formula. It includes the LLVM core libraries and command-line tools, the Clang compiler frontend, LLDB debugger, LLD linker, libc++, MLIR tooling, and many smaller developer utilities.

### 项目历史

LLVM began as a University of Illinois research project to provide a modern SSA-based compilation strategy for static and dynamic languages. The official LLVM homepage describes the project as a collection of modular and reusable compiler and toolchain technologies, with LLVM now functioning as a project name rather than an acronym for a virtual machine.

The project grew from core optimizer and code-generation libraries into an umbrella project. The official overview lists major subprojects such as Clang for C-family languages, LLDB for native debugging, LLD for linking, libc++ for the C++ standard library, Flang for Fortran, and MLIR infrastructure for compiler construction. The GitHub README describes the repository as source for compilers, optimizers, and run-time environments.

### 采用历史

LLVM became a package-manager staple because it is both an end-user toolchain and a dependency for other language runtimes, build systems, static analyzers, editor integrations, and cross-compilation stacks. The official homepage notes production use by commercial and open-source projects and continued academic use, which matches the broad package-manager coverage shown in the input metadata.

For Homebrew users, llvm is often installed to obtain a newer clang than Apple's system compiler, a full llvm-config and library stack, up-to-date linker and object-file tools, clang-format, clang-tidy, clangd, lldb, and architecture-specific utilities. Versioned Homebrew formulae such as llvm@14 through llvm@17 exist because downstream projects frequently need a stable ABI, code-generation behavior, or plugin API tied to a specific LLVM major release.

### 使用方式

Users install llvm to compile C, C++, Objective-C, and other LLVM-backed languages; run optimizer and code-generation tools such as opt and llc; inspect and transform object files with llvm-objdump, llvm-nm, llvm-ar, and llvm-strip; debug with lldb; format and analyze C-family source with clang-format, clang-tidy, and clangd; and build other packages that need llvm-config or LLVM libraries.

The package is also a build dependency for projects that embed LLVM as a library, generate LLVM IR, ship compiler plugins, or need MLIR and TableGen tooling. In package-manager culture, llvm is less a single command than a large toolchain substrate whose installed prefix can change the behavior of many builds.

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

LLVM is one of the most consequential developer-tool packages in Unix package managers: it provides compilers, linkers, debuggers, binary utilities, formatters, language servers, and libraries that other packages compile against. Its formula is watched closely because a major LLVM bump can reveal C++ standard-library issues, linker changes, sanitizer behavior changes, and downstream projects that accidentally depended on private compiler internals.

The package is also historically important because it displaced the idea that a system compiler was a monolith. LLVM's reusable libraries let package ecosystems build many language frontends, analyzers, and toolchain experiments on common optimizer and code-generation components.

### 时间线

- 2000: LLVM begins as a University of Illinois research project.
- 2003: LLVM 1.0 is announced as an open compiler infrastructure release.
- 2011: The LLVM name is treated as the project brand rather than an acronym.
- 2016-12-07: The llvm/llvm-project monorepo is created on GitHub.
- 2019: LLVM 9.0.0 and later releases use Apache-2.0 WITH LLVM-exception licensing.
- 2022-03-23: LLVM 14.0.0 is published.
- 2022-09-06: LLVM 15.0.0 is published.
- 2023-03-17: LLVM 16.0.0 is published.
- 2023-09-19: LLVM 17.0.1 is published.

### Related projects

- Clang, LLDB, LLD, libc++, Flang, MLIR, compiler-rt, OpenMP, and polly are LLVM umbrella subprojects or closely shipped components.
- Projects such as Rust, Swift, Julia, Zig, Mesa, WebAssembly toolchains, and many static-analysis tools are common LLVM consumers in package-manager ecosystems.
- Homebrew's llvm@14, llvm@15, llvm@16, and llvm@17 formulae preserve older major release lines for packages that cannot immediately follow the current llvm formula.

### 来源

- <https://api.github.com/repos/llvm/llvm-project/releases>
- <https://github.com/llvm/llvm-project>
- <https://github.com/llvm/llvm-project#readme>
- <https://llvm.org/>
- <https://llvm.org/docs>
- <https://releases.llvm.org/>
- source_facts.package-manager


## 安全说明

compiler and toolchain runtime.

- **Geiger 风险:** yellow / 高
- compiler and toolchain runtime

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

- Debian apt - llvm - 1:19.0-63: normalized package name match | Debian stable package indexes: llvm from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Modular compiler and toolchain technologies
- Nix - llvm: normalized package name match | nixpkgs package indexes: llvm from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - llvm - 1:18.0-59~exp2: normalized package name match | Ubuntu 24.04 LTS package indexes: llvm from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Low-Level Virtual Machine (LLVM)
- apk - llvm - 22-r0: normalized package name match | Alpine Linux edge package indexes: llvm from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Low Level Virtual Machine compiler system, default version. | https://llvm.org/
- apk - llvm-dev - 22-r0: normalized package name match | Alpine Linux edge package indexes: llvm-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Low Level Virtual Machine compiler system, default version. | https://llvm.org/
- apk - llvm-gtest - 22-r0: normalized package name match | Alpine Linux edge package indexes: llvm-gtest from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | LLVM default gtest static libraries | https://llvm.org/
- apk - llvm-libs - 22-r0: normalized package name match | Alpine Linux edge package indexes: llvm-libs from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | LLVM 22 runtime library | https://llvm.org/
- apk - llvm-linker-tools - 22-r0: normalized package name match | Alpine Linux edge package indexes: llvm-linker-tools from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Low Level Virtual Machine compiler system, default version. (linker plugins) | https://llvm.org/
- apk - llvm-static - 22-r0: normalized package name match | Alpine Linux edge package indexes: llvm-static from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | LLVM 22 static libraries | https://llvm.org/
- apk - llvm-test-utils - 22-r0: normalized package name match | Alpine Linux edge package indexes: llvm-test-utils from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | LLVM utilities for executing LLVM and Clang style test suites | https://llvm.org/
- dnf - clang - 22.1.8-20.fc45: normalized package name match | Fedora Rawhide package metadata: clang from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | A C language family front-end for LLVM | http://llvm.org
- dnf - clang-analyzer - 22.1.8-20.fc45: normalized package name match | Fedora Rawhide package metadata: clang-analyzer from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | A source code analysis framework | http://llvm.org
- dnf - clang-devel - 22.1.8-20.fc45: normalized package name match | Fedora Rawhide package metadata: clang-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Development header files for clang | http://llvm.org
- dnf - clang-libs - 22.1.8-20.fc45: normalized package name match | Fedora Rawhide package metadata: clang-libs from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Runtime library for clang | http://llvm.org
- dnf - clang-resource-filesystem - 22.1.8-20.fc45: normalized package name match | Fedora Rawhide package metadata: clang-resource-filesystem from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Filesystem package that owns the clang resource directory | http://llvm.org
- dnf - clang-tools-extra - 22.1.8-20.fc45: normalized package name match | Fedora Rawhide package metadata: clang-tools-extra from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Extra tools for clang | http://llvm.org


## Combined YAML source

View the package source record on GitHub. [combined/llvm.yml](https://github.com/mxcl/pkgdb/blob/main/combined/llvm.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
