-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
更新Mac的安装教程 #2230
base: main
Are you sure you want to change the base?
更新Mac的安装教程 #2230
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,39 @@ cp target/debug/rooch.exe ~/.cargo/bin/ | |
``` | ||
|
||
### macOS | ||
#### 第一步,从 [github release page](https://github.com/rooch-network/rooch/releases) 下载 | ||
`rooch-macos-latest.zip`,解压文件并将二进制文件移动到 `~/.local/bin/` 中 | ||
|
||
#### 第二步,克隆源码 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这是第一步 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 建议像本文档前面部分关于 linux 安装步骤的描述修改 mac 相关的步骤 |
||
|
||
```shell | ||
git clone https://github.com/rooch-network/rooch.git | ||
``` | ||
|
||
#### 第三步,先到`rooch`目录下面,执行下面命令(会进行下载,时间比较久) | ||
```shell | ||
cargo build | ||
``` | ||
如果遇到报错 | ||
```shell | ||
Error: Could not find `protoc`. If `protoc` is installed, try setting the `PROTOC` environment variable to the path of the `protoc` binary. To install it on macOS, run `brew install protobuf`. It is also available at https://github.com/protocolbuffers/protobuf/releases For more information: https://docs.rs/prost-build/#sourcing-protoc | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这属于依赖,参考其它 platform 的描述 |
||
``` | ||
执行命令下载`protobuf`,下载成功后重新执行`cargo build` | ||
```shell | ||
brew install protobuf | ||
``` | ||
|
||
#### 第四步,打开一个新的终端窗口并运行 `rooch` 检查是否工作 | ||
```shell | ||
rooch | ||
``` | ||
|
||
|
||
|
||
## 二进制安装 | ||
|
||
### MacOS | ||
#### 第一步,创建一个二进制文件目录 | ||
|
||
首先,创建一个二进制文件目录 | ||
|
||
|
@@ -78,11 +111,35 @@ mkdir ~/.local/bin/ | |
export PATH="$PATH:$HOME/.local/bin" | ||
``` | ||
|
||
第三步,从 [github release page](https://github.com/rooch-network/rooch/releases) 下载 `rooch-macos-latest.zip`,解压文件并将二进制文件移动到 `~/.local/bin/` 中 | ||
第三步,从 [github release page](https://github.com/rooch-network/rooch/releases) 下载 | ||
`rooch-macos-latest.zip`,解压文件并将二进制文件移动到 `~/.local/bin/` 中 | ||
|
||
最后,打开一个新的终端窗口并运行 `rooch` 检查是否工作 | ||
``` | ||
如果运行的时候出现下面报错 | ||
```shell | ||
zsh: command not found: rooch | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. zsh 只是一种 shell,这里没必要描述 $PATH 配置 |
||
``` | ||
大概率是在第二步出现的问题,可能是由于路径问题或者是忘记保存配置问题,可以参考这几个命令进行解决 | ||
```shell | ||
# 确认 rooch 文件已存在 | ||
ls ~/.local/bin/rooch | ||
|
||
# 确认 ~/.zshrc 文件中包含以下行 | ||
echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.zshrc | ||
|
||
# 重新加载 ~/.zshrc 文件 | ||
source ~/.zshrc | ||
|
||
# 验证 PATH 环境变量 | ||
echo $PATH | ||
|
||
# 运行 rooch | ||
rooch | ||
|
||
``` | ||
|
||
|
||
## 二进制安装 | ||
|
||
### Linux | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这不属于编译安装