For Ubuntu:
==============================
=> ([Link]
run-the-node/building-the-node)
=>([Link]
started/[Link])
sudo apt-get update -y
sudo apt-get install automake build-essential pkg-config libffi-dev libgmp-dev
libssl-dev libtinfo-dev libsystemd-dev zlib1g-dev make g++ tmux git jq wget
libncursesw5 libtool autoconf liblmdb-dev -y
ghcup install ghc 8.10.7
ghcup install cabal [Link]
ghcup set ghc 8.10.7
ghcup set cabal [Link]
which cabal
mkdir -p ~/src
cd ~/src
Download and install libsodium:
----------------------------------------------
git clone [Link]
cd libsodium
git checkout 66f017f1
./[Link]
./configure
make
make check
sudo make install
Add the following to your ~/.bashrc file and source it (or re-open the terminal):
-----------------------------------------------------------------------------------
-----
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
Installing Secp256k1:
-----------------------------------
mkdir -p ~/src
cd ~/src
git clone [Link]
cd secp256k1
git checkout ac83be33
./[Link]
./configure --enable-module-schnorrsig --enable-experimental
make
make check
sudo make install
Downloading the source code for cardano-node:
-----------------------------------------------------
git clone [Link]
cd cardano-node
Check out the latest version of cardano-node:
---------------------------------------------------------
git fetch --all --recurse-submodules --tags
git tag
git checkout tags/1.35.6
Configuring the build options:
--------------------------------------------------
echo "with-compiler: ghc-8.10.7" >> [Link]
echo "package trace-dispatcher" >> [Link]
echo " ghc-options: -Wwarn" >> [Link]
echo "" >> [Link]
echo "package HsOpenSSL" >> [Link]
echo " flags: -homebrew-openssl" >> [Link]
echo "" >> [Link]
Building and installing the node:
---------------------------------------------------
cabal update
cabal build all
Install the newly built node and CLI commands to the ~/.local/bin directory:
-----------------------------------------------------------------------------------
mkdir -p ~/.local/bin
cp -p "$(./scripts/[Link] cardano-node)" ~/.local/bin/
cp -p "$(./scripts/[Link] cardano-cli)" ~/.local/bin/
Check the version that has been installed:
------------------------------------------------
cardano-cli --version
cardano-node --version