Installing Cardano node on Ubuntu - cabal build all fails

I am trying to install a Cardano node on a Ubuntu 18.04 LTS machine on Azure as per (https://docs.cardano.org/projects/cardano-node/en/latest/getting-started/building-the-node-using-nix.html) and everthing is fine until I get to the ‘cabal build all’ command where I get a bunch of warnings (please see below) and it doesn’t do anything. I tried ‘cabal update’ but that didn’t help any. All the previous commands worked without errors. Any suggestions appreciated.

bosr@geth:/home/cardano-node$ sudo cabal build all
Warning: /home/bosr/.cabal/config: Unrecognized stanza on line 143
/home/bosr/.cabal/config: Unrecognized field installdir on line 120
Package has never been configured. Configuring with default flags. If this
fails, please run configure manually.
Warning: /home/bosr/.cabal/config: Unrecognized stanza on line 143
/home/bosr/.cabal/config: Unrecognized field installdir on line 120
cabal: No cabal file found.
Please create a package description file <pkgname>.cabal

Did you installed cabal first?

As the Cardano node is using cabal , so let’s install it as well. We will use the recommended version 3.2.0.0 and install to our local bin folder ( .local/bin )

wget https://downloads.haskell.org/~cabal/cabal-install-3.2.0.0/cabal-install-3.2.0.0-x86_64-unknown-linux.tar.xz

tar -xf cabal-install-3.2.0.0-x86_64-unknown-linux.tar.xz

rm cabal-install-3.2.0.0-x86_64-unknown-linux.tar.xz cabal.sig

mkdir -p ~/.local/bin

mv cabal ~/.local/bin/

You should now have cabal installed in your ~/.local/bin/ folder, now we just have to make sure, that the system also can find the cabal bin(executive) file, so let’s make sure, that the system knows where to look. Let’s add this information in our user profile file (.bashrc), reload it (using source command), and check if we see our ~/.local/bin/ folder in the list.

Source:

https://cardano-node-installation.stakepool247.eu/cardano-node-prerequisites

1 Like

Thank you Alexd1985. With your help and link I was able to get the node compiled and running. Thanks again.

1 Like