# 编译（MacOS）

## 安装go等必须的软件

```bash
brew install go
```

## 设置gopaht环境变量

```bash
#新建gopath
mkdir PAHT_TO_GOPATH

#导出环境变量
export gopath=PAHT_TO_GOPATH

#然后在gopath下创建下面的目录
PAHT_TO_GOPATH/src/github.com/ethereum/

#设置必要的代理信息
export http_proxy=xxxx:xx
export https_proxy=xxxx:xx
export no_proxy="localhost, 127.0.0.1, 192.168.99.100, 根据你自己的实际情况进行处理"
```

## 下载源码

```bash
cd PAHT_TO_GOPATH/src/github.com/ethereum/
git clone https://github.com/ethereum/go-ethereum.git
```

## 编译

```bash
cd go-ethereum
make geth
```

## 完结


---

# 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://neochain.gitbook.io/project/ethereum/bian-yi-macos.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.
