English
Installing Cabal and GHC
If using Ubuntu Desktop, press Ctrl+Alt+T. This will launch a terminal window.
First, update packages and install Ubuntu dependencies.
1
sudo apt-get update -y
Copied!
1
sudo apt-get upgrade -y
Copied!
1
sudo apt-get install git jq bc make automake rsync htop curl build-essential pkg-config libffi-dev libgmp-dev libssl-dev libtinfo-dev libsystemd-dev zlib1g-dev make g++ wget libncursesw5 libtool autoconf liblmdb-dev -y
Copied!
Install Libsodium.
1
mkdir $HOME/git
2
cd $HOME/git
3
git clone https://github.com/input-output-hk/libsodium
4
cd libsodium
5
git checkout 66f017f1
6
./autogen.sh
7
./configure
8
make
9
sudo make install
Copied!
Install libsecp256k1
1
cd $HOME/git
2
git clone https://github.com/bitcoin-core/secp256k1
3
cd secp256k1
4
git checkout ac83be33
5
./autogen.sh
6
./configure --enable-module-schnorrsig --enable-experimental
7
make
8
make check
9
sudo make installDebian OS pool operators: extra lib linking may be required.
Copied!
1
sudo ln -s /usr/local/lib/libsodium.so.23.3.0 /usr/lib/libsodium.so.23
Copied!
AWS Linux CentOS or Ubuntu pool operators: clearing the lib cache may be required.
1
sudo ldconfig
Copied!
Raspberry Pi 4 with Ubuntu pool operators: extra lib linking may be required.
1
sudo apt-get install libnuma-dev
Copied!
This will help to solve "cannot find -lnuma" error when compiling.
Install Cabal and dependencies.
1
sudo apt-get -y install pkg-config libgmp-dev libssl-dev libtinfo-dev libsystemd-dev zlib1g-dev build-essential curl libgmp-dev libffi-dev libncurses-dev libtinfo5
Copied!
1
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
Copied!
Answer NO to installing haskell-language-server (HLS).
Answer YES to automatically add the required PATH variable to ".bashrc".
1
cd $HOME
2
source .bashrc
3
ghcup upgrade
4
ghcup install cabal 3.4.0.0
5
ghcup set cabal 3.4.0.0
Copied!
Install GHC.
1
ghcup install ghc 8.10.4
2
ghcup set ghc 8.10.4
Copied!
Update PATH to include Cabal and GHC and add exports. Your node's location will be in $NODE_HOME. The cluster configuration is set by $NODE_CONFIG.
1
echo PATH="$HOME/.local/bin:$PATH" >> $HOME/.bashrc
2
echo export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" >> $HOME/.bashrc
3
echo export NODE_HOME=$HOME/cardano-my-node >> $HOME/.bashrc
4
echo export NODE_CONFIG=mainnet>> $HOME/.bashrc
5
source $HOME/.bashrc
Copied!
💡
How to use this Guide on TestNet
Run the following commands to set your NODE_CONFIG to testnet rather than mainnet.
1
echo export NODE_CONFIG=testnet>> $HOME/.bashrc
2
source $HOME/.bashrc
Copied!
As you work through this guide, replace every instance of** **CLI parameter
1
--mainnet
Copied!
with
1
--testnet-magic 1097911063
Copied!
Update cabal and verify the correct versions were installed successfully.
1
cabal update
2
cabal --version
3
ghc --version
Copied!
Cabal library should be version 3.4.0.0 and GHC should be version 8.10.4
Copy link