Getting ready to install the Cardano Node (v1.30.1)
Now the most complicated part (not so complicated if you follow this guide :) ) - the installation process!
to successfully install (compile) the Carano node, we need to be sure that we have all the necessary ingredients! To get them (install) type the following commands:
1
sudo apt-get update -y
2
sudo apt-get upgrade -y
Copied!
1
sudo apt-get install curl wget python3 build-essential pkg-config libffi-dev libgmp-dev libssl-dev libtinfo-dev systemd libsystemd-dev libsodium-dev zlib1g-dev yarn make g++ jq libncursesw5 libtool autoconf automake git tmux htop nload -y
2
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
Copied!
This will install all the necessary software packages for our next steps.
As the Cardano node is using cabal, so let's install it as well. We will use the recommended version 3.4.0.0 and install it to our local bin folder (.local/bin)
to install cabal, we will be using ghcup (ghcup is an installer for the general-purpose language Haskell), more info you can check: https://www.haskell.org/ghcup/
1
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
Copied!
This Haskell installation script will ask for input:
Haskell Installation script
Press ENTER to continue
    When asked "Do you want ghcup to automatically add the required PATH variable to "/home/cardano/.bashrc?" press "A"
    When asked "Do you want to install haskell-language-server (HLS)?" Answer "No" (by pressing "N")
    When asked "Do you want to install stack?" Answer "No" (by pressing "N")
Press ENTER to proceed with cabal installation
When the installation is finished, you should see the following screen:
let's reload environment variables:
1
source /home/cardano/.ghcup/env
Copied!
Let's check which version we have installed
1
cabal --version
Copied!
you should see version 3.4.0.0
Let's set this one as the default version:
1
ghcup set cabal 3.4.0.0
Copied!
You should now have the cabal installed in /home/cardano/.ghcup/bin folder.

GHC 8.10.4 installation

Let's move to the next steps - installing GHC - the Haskell code compiler (Cardano node is based on the Haskell programming language).
As we already installed the handy ghcup tool, then this is done super easy:
1
ghcup install ghc 8.10.4
Copied!
GHC installation
After a short while, you should have GHC installed! Let's set it as the default version:
1
ghcup set ghc 8.10.4
Copied!
And check if everything has gone as planned:
1
ghc --version
Copied!
You should see:
GHC version check

Install Libsodium

One more thing we need is the Libsodium libraries so let's do this! let's create a git folder where we will be compiling libsodium library from the source code:
1
mkdir -p ~/git && cd ~/git
Copied!
Download and install libsodium library ( we need a specific branch of the library, so follow the guide)
1
git clone https://github.com/input-output-hk/libsodium
2
cd libsodium
3
git checkout 66f017f1
4
./autogen.sh
5
./configure
6
make
7
sudo make install
8
Copied!
Let's add the following PATHs to our .bashrc file and load them.
1
echo "export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH" >> ~/.bashrc
2
echo "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" >> ~/.bashrc
3
source ~/.bashrc
Copied!
Let's move to the next step - the actual installation of Cardano Node!
Last modified 22d ago