English
Compiling Source Code
Download source code and switch to the latest tag.
1
cd $HOME/git
2
git clone https://github.com/input-output-hk/cardano-node.git
3
cd cardano-node
4
git fetch --all --recurse-submodules --tags
5
git checkout $(curl -s https://api.github.com/repos/input-output-hk/cardano-node/releases/latest | jq -r .tag_name)
Copied!
Configure build options.
1
cabal configure -O0 -w ghc-8.10.7
Copied!
Update the cabal config, project settings, and reset build folder.
1
echo -e "package cardano-crypto-praos\n flags: -external-libsodium-vrf" > cabal.project.local
2
sed -i $HOME/.cabal/config -e "s/overwrite-policy:/overwrite-policy: always/g"
3
rm -rf $HOME/git/cardano-node/dist-newstyle/build/x86_64-linux/ghc-8.10.7
Copied!
Build the cardano-node from source code.
1
cabal build cardano-cli cardano-node
Copied!
Building process may take a few minutes up to a few hours depending on your computer's processing power.
Copy cardano-cli and cardano-node files into bin directory.
1
sudo cp $(find $HOME/git/cardano-node/dist-newstyle/build -type f -name "cardano-cli") /usr/local/bin/cardano-cli
Copied!
1
sudo cp $(find $HOME/git/cardano-node/dist-newstyle/build -type f -name "cardano-node") /usr/local/bin/cardano-node
Copied!
Verify your cardano-cli and cardano-node are the expected versions.
1
cardano-node version
2
cardano-cli version
Copied!
Copy link