THIS GUIDE IS FOR EDUCATIONAL PURPOSE ONLY. IT COMES WITH NO WARRANTY AND SHOULD BE USED AT YOUR OWN RISKS. MAKE THE APPROPRIATE BACKUPS!!! THIS GUIDE ASSUME YOU FOLLOWED https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node
Written by QCPOL (https://qcpol.stakepool.quebec)
sudo apt update
sudo apt upgrade
sudo apt autoremove
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 cabal 3.6.2.0
ghcup set cabal 3.6.2.0
ghcup rm cabal 3.4.0.0
echo export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" >> $HOME/.bashrc
source $HOME/.bashrc
cd $HOME/git
git clone https://github.com/bitcoin-core/secp256k1
cd secp256k1
git checkout ac83be33
./autogen.sh
./configure --enable-module-schnorrsig --enable-experimental
make
sudo make install
cd $HOME/git
git clone https://github.com/input-output-hk/cardano-node.git cardano-node-1.35.0
cd cardano-node-1.35.0
git fetch --all --recurse-submodules --tags
git checkout tags/1.35.0
echo -e "package cardano-crypto-praos\n flags: -external-libsodium-vrf" > cabal.project.local
echo "with-compiler: ghc-8.10.7" >> cabal.project.local
rm -rf $HOME/git/cardano-node-1.35.0/dist-newstyle/build/x86_64-linux/ghc-8.10.7
cabal build cardano-cli cardano-node cardano-submit-api
Add:
export LD_LIBRARY_PATH=/usr/local/lib
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
sudo systemctl stop cardano-node
sudo systemctl stop cardano-submit-api
sudo cp $(find $HOME/git/cardano-node-1.35.0/dist-newstyle/build -type f -name "cardano-cli") /usr/local/bin/cardano-cli
sudo cp $(find $HOME/git/cardano-node-1.35.0/dist-newstyle/build -type f -name "cardano-node") /usr/local/bin/cardano-node
sudo cp $(find $HOME/git/cardano-node-1.35.0/dist-newstyle/build -type f -name "cardano-submit-api") /usr/local/bin/cardano-submit-api
sudo systemctl start cardano-node
sudo systemctl start cardano-submit-api
Fails starting with update cabal section.
No user sessions are running outdated binaries.
[ Warn ] New GHCup version available: 0.1.17.7. To upgrade, run 'ghcup upgrade'
[ Warn ] New GHC version available: 9.0.1. To upgrade, run 'ghcup install ghc 9.0.1'
[ Error ] Unable to find a download for the requested version/distro.
[ Error ] Also check the logs in "/home/trusted/.ghcup/logs"
[ Warn ] New GHCup version available: 0.1.17.7. To upgrade, run 'ghcup upgrade'
[ Warn ] New GHC version available: 9.0.1. To upgrade, run 'ghcup install ghc 9.0.1'
[ Error ] The version "3.6.2.0" of the tool "Cabal" is not installed.
[ Warn ] New GHCup version available: 0.1.17.7. To upgrade, run 'ghcup upgrade'
[ Warn ] New GHC version available: 9.0.1. To upgrade, run 'ghcup install ghc 9.0.1'
[ Warn ] Symlink "/home/trusted/.ghcup/bin/cabal" is broken.