Compiling the Conflux Client
Here is a step by step guide on how to build Conflux from the source code and get a node running.
Install Build Dependencies
Conflux requires Rust 1.62.0, clang, and sqlite to build.
We recommend installing Rust through rustup. If you don't already have rustup or clang, you can install them like this:
Linux
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# you might need to run
# source "$HOME/.cargo/env"
# to configure your shell
rustup install 1.62.0
Other dependencies including clang, cmake (version >= 3.12) and sqlite (version >= 3.8.3) can be installed with:
- Ubuntu 18.04:
# The latest cmake version on Ubuntu 18.04 is 3.10, so you'll need to install it from the Kitware repository.
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
sudo apt-get update
sudo apt-get install clang libsqlite3-dev pkg-config libssl-dev cmake
- CentOS 7 / RHEL:
sudo yum install epel-release
sudo yum install clang gcc gcc-c++ openssl-devel cmake3 wget
# This may fail if you have installed cmake with version 2.8.
# You can choose to uninstall cmake first.
sudo ln -s /usr/bin/cmake3 /usr/bin/cmake
# The official sqlite version on CentOS 7 is 3.7.17, so we need to install the latest version from the source code.
# The source code have be downloaded from https://www.sqlite.org/download.html
wget https://www.sqlite.org/2020/sqlite-autoconf-3320100.tar.gz
tar xfvz sqlite-autoconf-3320100.tar.gz
cd sqlite-autoconf-3320100
./configure
make
sudo make install