# 预备条件 (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/)以获取其他安装选项。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET 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?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
