QTUM on Ubuntu 20.04 Focal Fossa
If you upgraded your Ubuntu to 20.04 and tried to run your daemon you probably got the message “shared library cannot be found,” right?
We’ll need to compile to our Focal Fossa because the Bitcoin PPA have not Release for libdb-4.8 and the boost 1.65 will be upgraded.
So the steps are quite similar to compile on Ubuntu 18.04.
Before we start, we need to prepare our develop environment, so let’s install the required packages for Ubuntu 20.04.
First, make the command to update your system:
sudo apt update
And now let’s upgrade if you have packages to be upgraded:
sudo apt upgrade -y
Now let’s install the required packages! We’ll do 2 separate install commands (this is only for a server, if you want to compile the desktop version we’ll include in the next command.
sudo apt install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev libgmp3-dev libzmq3-dev
sudo apt install software-properties-common
So, after do these commands you’ll be stuck because the official repository will guide you to add the Bitcoin PPA repository but the repository does not have aan Release for Focal Fossa yet.
Let’s compile! First let’s make a folder to compile the leveldb and QTUM later.
First let’s return to our home folder:
Now create a new folder:
Enter to the folder and get the source of leveldb:
Now we’ll decompress:
tar -xvf db-4.8.30.NC.tar.gz
If you try to compile now you’ll get an error, I don’t know why but we’re in 2020 and LevelDB didn’t solve this bug yet. Let’s bypass the bug:
sed -i ‘s/__atomic_compare_exchange/__atomic_compare_exchange_db/g’ db-4.8.30.NC/dbinc/atomic.h
Now let’s enter to the folder, create a build folder, and configure everything to compile:
cd db-4.8.30.NC/build_unixmkdir -p buildBDB_PREFIX=$(pwd)/build../dist/configure — disable-shared — enable-cxx — with-pic — prefix=$BDB_PREFIX
After these commands lets make and install the leveldb 4.8:
makesudo make install
After some time you’re ready to go with the QTUM compilation!
In this step, if you want to compile the DESKTOP version (the GUI) you’ll need to install the QT, so if you do not want to compile the GUI just go to the next step!
Install the QT:
sudo apt install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler qrencode
Now we’ll clone the QTUM repository and compile, remember 1 command at a time:
git clone https://github.com/qtumproject/qtum — recursivecd qtum./autogen.sh./configuremake -j2
After some time you have the compiled QTUM for Focal Fossa, just copy from the /src folder and execute.
by the author.