Need help with updating cardano-node and cardano-cli


I ran into few issues while trying to update to cardano 1.19.1 and so I’m hoping to some help, thank you!

  1. On one of my relays, the update stopped and I got this error below:
[ 4 of 16] Compiling Ledger.GlobalParams ( src/Ledger/GlobalParams.hs, dist/build/Ledger/GlobalParams.o )
[ 5 of 16] Compiling Ledger.Core.Generators ( src/Ledger/Core/Generators.hs, dist/build/Ledger/Core/Generators.o )
[ 6 of 16] Compiling Ledger.Util      ( src/Ledger/Util.hs, dist/build/Ledger/Util.o )
[ 7 of 16] Compiling Ledger.Update    ( src/Ledger/Update.hs, dist/build/Ledger/Update.o )

src/Ledger/Update.hs:1:1: error:
    Exception when trying to run compile-time code:
      /tmp/cabal-install.-152259/dist-newstyle/tmp/src-152259/cs-ledger- openBinaryFile: does not exist (No such file or directory)
    Code: mkGoblinGens
            ["UPREGFailure_DoesNotVerify", "UPREGFailure_NotGenesisDelegate",
             "UPREGFailure_UPVFailure_PVChangedInSVUpdate", ....]
1 | {-# LANGUAGE DeriveAnyClass #-}
  | ^
cabal: Failed to build cs-ledger- (which is required by exe:cardano-cli
from cardano-node-1.9.1, exe:cardano-node from cardano-node-1.9.1 and others).
  1. For another relay node, I first ran cabal update and then proceeded to update cardano-node
    The update seemed to have completed successfully but then when I try to move the files to .local/bin
cp -p dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-node-1.19.1/x/cardano-node/build/cardano-node/cardano-node ~/.local/bin/

cp -p dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-node-1.19.1/x/cardano-node/build/cardano-node/cardano-node ~/.local/bin/

I get this error …

cp: cannot stat 'dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-node-1.19.1/x/cardano-node/build/cardano-node/cardano-node': No such file or directory

For both times, I tried to update via the below code

cd cardano-node
git fetch --all --tags
git checkout tags/1.9.1
cabal install cardano-node cardano-cli

Would appreciate any help I could get.

Thank you!

So I tried to update cardano-node again and didn’t get the first error.
Still not able to move the node and cli files to .local/bin same error as mentioned above. File not found.
What is this path?
Maybe understanding it would help fix this issue?

if you are upgrading, then you should have all the necessary packages installed, try this:
sudo apt-get update -y
sudo apt-get upgrade -y
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"

cd cardano-node
git fetch --all --tags && git tag
git checkout tags/1.19.1
echo -e “package cardano-crypto-praos\n flags: -external-libsodium-vrf” > cabal.project.local
cabal clean
cabal update
cabal build all

when done

mkdir -p ~/.local/bin/
cp -p dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-cli-1.19.1/x/cardano-cli/build/cardano-cli/cardano-cli ~/.local/bin/
cp -p dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-node-1.19.1/x/cardano-node/build/cardano-node/cardano-node ~/.local/bin/

Thanks for your response Lauris!

What’s this code do?
echo -e “package cardano-crypto-praos\n flags: -external-libsodium-vrf” > cabal.project.local

I tried reinstalling the update from the above steps, but I get this error on entering ‘cabal upate’…

cabal: Error parsing project local configuration file
unrecognised field or section: “\8220package cardano-crypto-praosn flags:

Kindly help?

Thank you!

Maybe you haven’t installed libsodium package?

Try installing dependencies (and other tools)

sudo apt-get -y install build-essential pkg-config libffi-dev libgmp-dev libssl-dev libtinfo-dev systemd libsystemd-dev libsodium-dev zlib1g-dev yarn make g++ jq libncursesw5 libtool

Then try again

Also when I check the version of Cabal,
cabal --version

I do see the updated version.
cabal-install version
compiled using version of the Cabal library

I’ve added these pre-req to my .bashrc so I wouldn’t have to enter them all the time when running node 1.19.0
export PATH="~/.local/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
export CARDANO_NODE_SOCKET_PATH=~/relay/db/node.socket

Hope this helps give you an understanding of my setup

Strange because I had 1.19.0 running with no issues… I ran the above code to install all dependencies. Still see the error.
cabal: Error parsing project local configuration file
unrecognised field or section: “\8220package cardano-crypto-praosn flags:

Btw, I was able to run cabal build all yesterday and it seemed to have completed successfully but the issue was when trying to move the files cardano-node and cardano-cli which is when I get this error.

cp: cannot stat ‘dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-node-1.19.1/x/cardano-node/build/cardano-node/cardano-node’: No such file or directory

So it’s kinda strange that now even cabal update is throwing an error.

I hope I’m helping you understand the situation to help me here :slight_smile:

Thank you! Appreciate your time!

Check what you have in cabal.project.local
It should be: package cardano-crypto-praos\n flags: -external-libsodium-vrf

In error message you have some additional numbers and missing newline character ‘\n’:
8220package cardano-crypto-praosn flags:

Do this again (cardano-node folder)
echo -e “package cardano-crypto-praos\n flags: -external-libsodium-vrf” > cabal.project.local

I think it was the quotes. cabal update is running when I typed the code instead of copy paste.

The problem is in wrong quotes(looks like i had to paste as quote to avoid that)
Try with this:

echo -e “package cardano-crypto-praos\n flags: -external-libsodium-vrf”> cabal.project.local

1 Like

Yes! I just realized it too. Okay, will proceed and let you know how it goes!

1 Like

Great! So it worked…

The issue was here… cabal.project.local
I did a cat for this file on a node that had the same no directory found issue mentioned initially.
The cat returned the error… no directory found… as well.

It’s kinda strange that all my nodes were running fine with 1.19.0 so how did this ‘cabal.project.local’ file disappear?

I’m trying to understand this better because I’m glad I’m not running on mainnet. It would have been a disaster it were the case… lol

Thanks Lauris!

1 Like

you are welcome, glad that it’s sorted out now :+1:
Not sure why it has disappeared, but now you know what to check :slight_smile:

1 Like