Steps for 1.26.1 (non CNTOOLS , Coincashew users)

I copied those files to the new location, because I looked in the GHC 8.10.4 folder and those files arent in there anymore.

sudo cp $(find $HOME/git/cardano-node/dist-newstyle/build -type f -name "cardano-cli") /usr/local/bin/cardano-cli

sudo cp $(find $HOME/git/cardano-node/dist-newstyle/build -type f -name "cardano-node") /usr/local/bin/cardano-node

thatā€™s strange, because cp (copy) doesnā€™t remove the files from the source. So it could mean that you didnā€™t build the ā€˜cardano-cli and cardano-nodeā€™ or didnā€™t build sucessful (run this again: cabal build cardano-cli cardano-node) or check that their are build.

sudo cp (find HOME/git/cardano-node/dist-newstyle/build -type f -name "cardano-cli") /usr/local/bin/cardano-cli :~/git/cardano-node sudo cp $(find $HOME/git/cardano-node/dist-newstyle/build -type f -name ā€œcardano-nodeā€) /usr/local/bin/cardano-node
cp: cannot create regular file ā€˜/usr/local/bin/cardano-nodeā€™: Text file busy

$ cardano-cli version
cardano-cli 1.25.1 - linux-x86_64 - ghc-8.10
git rev 9a7331cce5e8bc0ea9c6bfa1c28773f4c5a7000f

$ cardano-node version
cardano-node 1.25.1 - linux-x86_64 - ghc-8.10
git rev 9a7331cce5e8bc0ea9c6bfa1c28773f4c5a7000f

find HOME/git/cardano-node/dist-newstyle/build -type f -name "cardano-cli" find: ā€˜HOME/git/cardano-node/dist-newstyle/buildā€™: No such file or directory :~/git/cardano-node find HOME/git/cardano-node/dist-newstyle/build -type f -name ā€œcardano-nodeā€
find: ā€˜HOME/git/cardano-node/dist-newstyle/buildā€™: No such file or directory
:~/git/cardano-node$

did you do this step? ā€œstop serviceā€?

i did i just rebooted my server so it turned on again.

sudo cp (find $HOME/git/cardano-node/dist-newstyle/build -type f -name ā€œcardano-cliā€) /usr/local/bin/cardano-cli

:~/git/cardano-node$ sudo cp $(find $HOME/git/cardano-node/dist-newstyle/build -type f -name ā€œcardano-nodeā€) /usr/local/bin/cardano-node

:~/git/cardano-node$
:~/git/cardano-node$ cardano-node version
cardano-node 1.25.1 - linux-x86_64 - ghc-8.10
git rev 9a7331cce5e8bc0ea9c6bfa1c28773f4c5a7000f

git checkout tags/1.26.1
HEAD is now at 62f38470 Prepare 1.26.1 release.

for the first sudo you miss a ... it's sudo cp (ā€¦

go to cardano-node folder (cd $HOME/git/cardano-node) and paste:
find dist-newstyle/build/x86_64-linux/ghc-8.10.4/ -type f -name "cardano-node"
and see if it finds something

ach look the second one worked, that means it is just the missing $ sign

$ find dist-newstyle/build/x86_64-linux/ghc-8.10.4/ -type f -name ā€œcardano-nodeā€
dist-newstyle/build/x86_64-linux/ghc-8.10.4/cardano-node-1.26.1/x/cardano-node/build/cardano-node/cardano-node

thats just the folder, the true path is:
/git/cardano-node/dist-newstyle/build/x86_64-linux/ghc-8.10.4/cardano-node-1.26.1/x/cardano-node/build/cardano-node$

exactly see, itā€™s still thereā€¦that means that you copy the commands wrongly or maybe you donā€™t have variable $HOME defined ā€¦

so try to replace $HOME with ~ (assuming that the git is in the users default folder):

sudo cp $(find ~/git/cardano-node/dist-newstyle/build -type f -name "cardano-cli") /usr/local/bin/cardano-cli

and do the same for the second command

I have $HOME defined.
That command didnt help.

:~/git/cardano-node/dist-newstyle/build/x86_64-linux/ghc-8.10.4/cardano-node-1.26.1/x/cardano-node/build/cardano-node$ sudo cp cardano-node /usr/local/bin/cardano-node

$ cardano-node version
cardano-node 1.25.1 - linux-x86_64 - ghc-8.10

interesting, try this command too (source ~/.bashrc). I mean for me worked without it.
and then again check the versions.

PATH=/home/xx/.local/bin:/home/xx/.local/bin:/home/xxx/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/us>
export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib:/usr/local/lib:/usr/local/lib:/usr/local/lib:
export NODE_HOME=/home/xxx/cardano-my-node
export NODE_CONFIG=mainnet
export NODE_BUILD_NUM=5821110
export CARDANO_NODE_SOCKET_PATH=/home/xx/cardano-my-node/db/socket

[ -f ā€œ/home/xxx/.ghcup/envā€ ] && source ā€œ/home/xx/.ghcup/envā€ # ghcup-env

i donā€™t know what you want to tell me with this comment :slight_smile:

That I sourced the .bashrc and just showing you my config to see if you see anything wrong. I just deleted my node/cli and copied again still 1.25.1

I did this twice already, but I deleted my entire cardano-node folder and installed from scratch twice already. So I donā€™t think doing it again is gonna make a difference. But Iā€™ll start from scratch again.

git clone https://github.com/input-output-hk/cardano-node.git
??

when you do the find you can just do (find $HOME/git/cardano-node -type f -iname ā€œcardano-nodeā€) you donā€™t need the ā€œdist-newstyle/buildā€ maybe will change something for you.

cd $HOME/git
# delete cardano-node
# sudo rm -rf cardano-node
git clone https://github.com/input-output-hk/cardano-node.git
cd cardano-node
git fetch --all --recurse-submodules --tags
git checkout tags/1.26.1

Hi @niwde,

Can you explain what you mean by changing the it to block line 21? My topologyupdater.sh currently has
blockNo=$(/usr/local/bin/cardano-cli query tip ${NETWORK_IDENTIFIER} | jq -r .blockNo )

Do I change it to
blockNo=$(/usr/local/bin/cardano-cli query tip ${NETWORK_IDENTIFIER} | jq -r .block21 )
?

Thank you!
David

blockNo > block i think he met, but im not there yet.

this is the line 21:

blockNo=$(/usr/local/bin/cardano-cli query tip ${NETWORK_IDENTIFIER} | jq -r .blockNo )

and you have to change the last .blockNo to .block =>

blockNo=$(/usr/local/bin/cardano-cli query tip ${NETWORK_IDENTIFIER} | jq -r .block )

2 Likes

I ultimately ended up using the Update 1.24.2 to 1.25.1 with 1.26.1 in place of 1.25.1 and 8.10.4 in place of 8.10.2 and the rest of the guide worked. Iā€™m not sure where I went wrong on here, but I am up to date :+1:

1 Like

To update with $HOME/git/cardano-node as the current binaries directory, copy the whole cardano-node directory to a new place so that you have a backup. Also make sure to do a snapshot of your server/db if anything goes wrong.

sudo apt-get update
sudo apt-get upgrade
sudo reboot

cd $HOME/git
mv cardano-node cardano-node-old
git clone GitHub - input-output-hk/cardano-node: The core component that is used to participate in a Cardano decentralised blockchain. cardano-node2
cd cardano-node2/

Read the patch notes for any other special updates or dependencies that may be required for the latest release.

Remove the old binaries and rebuild the latest binaries. Run the following command to pull and build the latest binaries. Change the checkout tag or branch as needed.

cd $HOME/git/cardano-node2
git clean -fd
git fetch --all --recurse-submodules --tags
git checkout tags/1.26.2 && git pull

Install ghcup (optional - if not yet installed)

  curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
  source ~/.bashrc

OR Upgrade ghcup

ghcup upgrade  (just to make sure ghcup is on the latest version)
ghcup install ghc 8.10.4
ghcup set ghc 8.10.4
ghc --version   (just to check the correct version)
ghcup install cabal 3.4.0.0
ghcup set cabal 3.4.0.0
cabal --version   (just to check the correct version)
cabal update  (just to make sure all dependencies are in the info)

GHCUP changes the paths (Cabal 3.4.0.0 not changing from 3.2.0.0 (solved) - #2 by Anti.biz) which cabal / which ghc`

cabal configure -O0 -w ghc-8.10.4
echo -e "package cardano-crypto-praos\n flags: -external-libsodium-vrf" > cabal.project.local
cabal build cardano-node cardano-cli

Verify your cardano-cli and cardano-node were updated to the expected version.

$(find $HOME/git/cardano-node2/dist-newstyle/build -type f -name "cardano-cli") version

$(find $HOME/git/cardano-node2/dist-newstyle/build -type f -name "cardano-node") version

Stop your node before updating the binaries.

sudo systemctl stop cardano-node

Copy cardano-cli and cardano-node files into bin directory.

sudo cp $(find $HOME/git/cardano-node2/dist-newstyle/build -type f -name "cardano-cli") /usr/local/bin/cardano-cli

sudo cp $(find $HOME/git/cardano-node2/dist-newstyle/build -type f -name "cardano-node") /usr/local/bin/cardano-node

Verify your cardano-cli and cardano-node were copied successfully and updated to the expected version.

cardano-node version
cardano-cli version

Update the NODE_BULD_NUM

export NODE_BUILD_NUM=$(curl https://hydra.iohk.io/job/Cardano/iohk-nix/cardano-deployment/latest-finished/download/1/index.html | grep -e "build" | sed 's/.*build\/\([0-9]*\)\/download.*/\1/g')
sed -i $HOME/.bashrc \
    -e "s/export NODE_BUILD_NUM=[0-9]\+/export NODE_BUILD_NUM=${NODE_BUILD_NUM}/g"
source $HOME/.bashrc

sudo systemctl start cardano-node

cd $HOME/git
mv cardano-node/ cardano-node-old/
mv cardano-node2/ cardano-node/

Do gliveView updates now (if any)

Check tip

cardano-cli query tip --mainnet

In ā€œtopologyUpdater.shā€ change the script to query the tip from blockNo to block line 21

blockNo=$(/usr/local/bin/cardano-cli query tip ${NETWORK_IDENTIFIER} | jq -r .block )

:robot: Important Reminder : Donā€™t forget to update your air-gapped offline machine (cold environment) with the new Cardano CLI binaries.

1 Like