构建
开始入门
安装

安装

编译安装

Ubuntu

安装依赖

sudo apt install git curl gcc lld pkg-config libssl-dev libclang-dev libsqlite3-dev g++

安装 Rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

克隆源码

git clone https://github.com/rooch-network/rooch.git

编译并安装 Rooch

cd rooch && cargo build && cp target/debug/rooch ~/.cargo/bin/

Windows

安装依赖

要在Windows上编译Rooch,您需要安装以下依赖项:

  1. Build Tools for Visual Studio 2022 (opens in a new tab)
  2. LLVM (opens in a new tab)
  3. Git (opens in a new tab)

请确保安装这些依赖项并设置必要的环境变量。

安装 Rust

下载安装 Windows Rust 工具链 https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe (opens in a new tab)

克隆源码

git clone https://github.com/rooch-network/rooch.git

编译并安装 Rooch

cd rooch
cargo build
cp target/debug/rooch.exe ~/.cargo/bin/

macOS

首先,创建一个二进制文件目录

mkdir ~/.local/bin/ 

第二步,将二进制文件目录添加到 ~/.zschrc

export PATH="$PATH:$HOME/.local/bin"

第三步,从 github release page (opens in a new tab) 下载 rooch-macos-latest.zip,解压文件并将二进制文件移动到 ~/.local/bin/

最后,打开一个新的终端窗口并运行 rooch 检查是否工作

二进制安装

Linux

下载

wget https://github.com/rooch-network/rooch/releases/download/v0.1/rooch-ubuntu-latest.zip

解压

unzip rooch-ubuntu-latest.zip

安装

sudo cp rooch /usr/local/bin