Building Qtum on Linux
Building Qtum Core on Ubuntu/Debian
Installing Dependencies
Install the required build dependencies:
bash
sudo apt update
sudo apt install build-essential libtool autotools-dev automake pkg-config \
bsdmainutils python3 git cmake libboost-all-dev libgmp3-dev \
libssl-dev libevent-devNote: CMake is required for building certain dependencies in the depends system.
Optional: GUI Dependencies
To build the Qt graphical interface (qtum-qt):
bash
sudo apt install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev \
qttools5-dev-tools libprotobuf-dev protobuf-compiler qrencodeOptional: Wallet Dependencies
For legacy wallet support (Berkeley DB 4.8):
bash
For descriptor wallet support, install sqlite3 (usually included by default on modern Ubuntu/Debian).
Compiling Qtum Core from Source
Method 1: Build with Depends System (Recommended)
This method builds all dependencies from source, ensuring compatibility:
bash
Binaries will be located in depends/x86_64-pc-linux-gnu/bin/.
Method 2: Build from Release Tarball
Download and build from a specific release:
bash
Binaries will be installed in depends/x86_64-pc-linux-gnu/bin/.
Method 3: System Dependencies (Advanced)
If you prefer using system libraries:
bash
Binaries will be in src/ directory.
Configuration Options
Build Without GUI
bash
Build Without Wallet
For running a node without wallet functionality:
bash
View All Configuration Options
bash
Running Qtum Core
After compilation, run the daemon:
bash
Or if built with the depends system:
bash
Create Configuration File
Create ~/.qtum/qtum.conf for custom settings:
conf
Enable QRC20 Token Support
To interact with QRC20 tokens, enable event logging and transaction indexing:
bash
Important: If the blockchain is already synced, reindex to build the transaction index:
bash
Note: Reindexing can take several hours depending on system performance.
Building on RHEL/CentOS/Fedora
CentOS 7
CentOS 7 requires additional setup due to older system packages:
Install Development Tools
bash
Enable Modern GCC
bash
Build Qtum
bash
This produces a static build that can run on other Linux distributions.
Fedora
bash
Building on Arch Linux
Example for a minimal node without wallet or GUI:
bash
Memory Optimization
C++ compilers are memory-intensive. On systems with limited RAM (< 1.5 GB), tune GCC to reduce memory usage:
bash
Alternatively, disable debug symbols:
bash
Cross-Compilation
ARM (Raspberry Pi)
bash
ARM64 (aarch64)
bash
Testing
Run the test suite (requires Python 3):
bash
Run functional tests:
bash
Troubleshooting
Build Fails Due to Missing Dependencies
Ensure all dependencies are installed. The autogen.sh script will indicate missing tools:
bash
Out of Memory During Compilation
Use fewer parallel jobs:
bash
Or disable parallel compilation:
bash
Berkeley DB Version Mismatch
Always use Berkeley DB 4.8 for wallet compatibility with official releases:
bash
Additional Resources
Build Documentation: build-unix.md
Dependencies Overview: dependencies.md
Depends System: depends/README.md
Gitian Builds: Reproducible Builds Guide
Release Notes: GitHub Releases
Quick Reference
bash
Last updated