> For the complete documentation index, see [llms.txt](https://tantalum666.gitbook.io/namada-docs-chinese/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tantalum666.gitbook.io/namada-docs-chinese/ru-men-zhi-nan-getting-started/an-zhuang-namada-install-namada/yuan-dai-ma-source/yu-bei-tiao-jian-prerequisites.md).

# 预备条件 (Pre-requisites)

如果您想从源代码安装 Namada，首先需要安装一些依赖项：

* [Rust](https://www.rust-lang.org/tools/install)
* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
* [Clang](https://clang.llvm.org/get_started.html)
* [OpenSSL](https://www.openssl.org/source/)
* [LLVM](https://releases.llvm.org/download.html)

***

## Rust

在安装结束时，请确保 Cargo 的 bin 目录 `$HOME/.cargo/bin` 在您的 PATH 环境变量上可用。您可以重新启动 shell 或运行 `source $HOME/.cargo/env` 来继续。

如果您已经安装了 Rust，请确保您通过运行以下命令来使用最新版本：

```
rustup update
```

***

## 剩余依赖项 (Remaining dependencies)

然后，安装剩余的依赖项。

**Ubuntu**：运行以下命令应安装所需的所有内容：

```
sudo apt-get install -y make git-core libssl-dev pkg-config libclang-12-dev build-essential protobuf-compiler
```

**Mac**：安装 Xcode 命令行工具应为您提供几乎所有所需内容：

```
xcode-select --install
```

还需要 `protoc`。在 Mac 上，您可以使用 `Homebrew` 安装它：

```
brew install protobuf
```

运行时

```
protoc --version
```

它应至少输出：

```
libprotoc 3.12.0
```

请参阅 [protoc 安装文档](https://grpc.io/docs/protoc-installation/)以获取其他安装选项。
