This document introduces how to compile and build the CKB from the source code.
CKB is developed with Rust. To get Rust and its tools, please refer to the rustup website for how to install rustup.
Install dependencies with the following command:
brew install autoconf libtool
sudo apt-get install -y git gcc libc6-dev pkg-config libssl-dev libclang-dev clang
sudo pacman -Sy git gcc pkgconf clang
For CentOS user, here's a guidance for you.
Here we build from the source code on
master branch, which is the latest release version. For other versions and branches, please check the CKB repo for more information.
Get the source code:
git clone https://github.com/nervosnetwork/ckb.git && \ cd ckb && \ git checkout master
You will find the generated executable binary in
Then you need to move it to a
sudo ln -snf "$(pwd)/target/release/ckb" /usr/local/bin/ckb
Then check if it works with:
(click here to view response)
ckb --version ckb 0.14.0 (rylai-v2 v0.14.0 2019-06-15)