For Ubuntu:
==============================
=> (https://cardano-course.gitbook.io/cardano-course/handbook/module-1-build-and-
run-the-node/building-the-node)
=>(https://github.com/input-output-hk/cardano-node/blob/master/doc/getting-
started/install.md)
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 3.6.2.0
ghcup set ghc 8.10.7
ghcup set cabal 3.6.2.0
which cabal
mkdir -p ~/src
cd ~/src
Download and install libsodium:
----------------------------------------------
git clone https://github.com/input-output-hk/libsodium
cd libsodium
git checkout 66f017f1
./autogen.sh
./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 https://github.com/bitcoin-core/secp256k1
cd secp256k1
git checkout ac83be33
./autogen.sh
./configure --enable-module-schnorrsig --enable-experimental
make
make check
sudo make install
Downloading the source code for cardano-node:
-----------------------------------------------------
git clone https://github.com/input-output-hk/cardano-node.git
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" >> cabal.project.local
echo "package trace-dispatcher" >> cabal.project.local
echo " ghc-options: -Wwarn" >> cabal.project.local
echo "" >> cabal.project.local
echo "package HsOpenSSL" >> cabal.project.local
echo " flags: -homebrew-openssl" >> cabal.project.local
echo "" >> cabal.project.local
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/bin-path.sh cardano-node)" ~/.local/bin/
cp -p "$(./scripts/bin-path.sh cardano-cli)" ~/.local/bin/
Check the version that has been installed:
------------------------------------------------
cardano-cli --version
cardano-node --version