Cabal fails when building Cardano Node


I installed Libsodium, GHC and followed along all the guide. I’m now stuck here, after doing cabal build all for the Cardano Node:

Warning: Requested index-state2020-07-15T00:00:00Z is newer than ''! Falling back to older state (2020-07-14T22:50:55Z).
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: lobemo-scribe-systemd- (user goal)
[__1] next goal: libsystemd-journal (dependency of lobemo-scribe-systemd)
[__1] rejecting: libsystemd-journal-1.4.4 (conflict: pkg-config package libsystemd==209 || >209, not found in the pkg-config database)
[__1] rejecting: libsystemd-journal-1.4.3, libsystemd-journal-1.4.2, libsystemd-journal-1.4.1, libsystemd-journal-1.4.0, libsystemd-journal-1.3.4, libsystemd-journal-1.3.3, libsystemd-journal-1.3.1, libsystemd-journal-1.3.0, libsystemd-journal-1.2.0, libsystemd-journal-1.1.0, libsystemd-journal-1.0.0 (constraint from project config TODO requires >=1.4.4)
[__1] fail (backjumping, conflict set: libsystemd-journal, lobemo-scribe-systemd)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: libsystemd-journal, lobemo-scribe-systemd

I have these variables set in my .bashrc:

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"

Any suggestion would help.

Thanks again,


usr/local/lib/ghc-8.6.5/bin/ghc-pkg: error while loading shared libraries: cannot open shared object file: No such file or directory
make[1]: *** [install_packages] Error 127
make: *** [install] Error 2
…I am having this exact same error while following this guide -

Im a newbie so I came here for answers.

I ran into similar issues. You can try some of these threads:

I’m not sure if nix is actually required or not.

So this seems to be working as Cabal has been building for the last 15 mins. In order to get GHC to install i had to use:

sudo yum install ncurses-compat-libs

then install ghc

tar -xf ghc-8.6.5-x86_64-deb9-linux.tar.xz
rm ghc-8.6.5-x86_64-deb9-linux.tar.xz
cd ghc-8.6.5
sudo make install
cd …

Cabal would still not build so then I tried installing dependencies again

sudo yum update -y
sudo yum install git gcc gcc-c++ tmux gmp-devel make tar wget -y
sudo yum install zlib-devel libtool autoconf -y
sudo yum install systemd-devel ncurses-devel ncurses-compat-libs -y


cd cardano-node


cabal build all

this seems to be working

1 Like

I’ve tried everything you guys said and now I’m back at the beginning with the same error, after cabal build all:

ghc: internal error: Unable to commit 1048576 bytes of memory
(GHC version 8.6.5 for x86_64_unknown_linux)
Please report this as a GHC bug:
cabal: Failed to build aeson- (which is required by exe:cardano-node-chairman from cardano-node-chairman-1.19.1, test:cardano-node-test from cardano-node-1.20.0 and others). The build process terminated with exit code -6

Any other suggestion?

Thank you very much,


I tried too, but ended up downgrading to 1.19.0, and the latest daedalus testnet wallet (2.1.0) version failed miserably - just a bunch of disconnection and syncing issues. I submitted a ticket, and the next day after that when I tried to run my 2.1.0 testnet wallet once more, I got a new message on the 2.1.0 testnet wallet itself saying that I should upgrade to version 2.2.0, and so I clicked on the link provided along with the message, taking me to the download page, thinking I was going to download a new testnet wallet version, and when I clicked on download button, a pop-up window asked me if I wanted to open or save 2.2.0 mainnet wallet, so I’ve come to the conclusion that testnet software has been sufficiently neglected and there are so many SPOs on mainnet not producing any blocks, they don’t want to add to the problem by creating more “graduates” from the testnet “school”. I think they just want to move us over to mainnet, boost up the k value ASAP to incentivize delegates(gators) to move away from saturated pools, then maybe after enough SPOs drop out or give up, or the demand from delegators for the number of pools grow sufficiently large given enough time, then maybe they might support testnet sufficiently for it to work correctly again.
I could be wrong because I was never able to install 1.20.0 node because I didn’t spend that much time trying to install it…too much of a headache…but the reason I believe testnet is basically dead is because I believe the cardano testnet node and daedalus testnet wallet are suffciently linked; i.e., if you know the testnet wallet isn’t going to work, then what’s the point of having a partial testnet solution, with only the cardano testnet node running? Sure, you get some practice, but not the complete experience that the stakepool course was designed to prepare you for.

sudo adduser is the correct syntax and you should be able to set a password along the way. beware not to use: useradd - this one doesn’t build the home directory.

means the building ran out of memory. I’d advise you to stop all running programs not essential to building while running cabal build all.

And: Really - it sounds strange - but try if your build reaches different stages if you just run cabal build all again - it happens! and it’s a ghc related issue which only sometimes arises.

The problem was that I was running on the free tier instance and that only allows 1 GB RAM. I had to change to a paying instance with 4 GB RAM.

And if you are building your node and you get some errors, try to install all dependencies again. In my case, I found that many of them were gone (don’t know why, despite I installed them at the very beginning). Just run all sudo yum install again and try cabal build all again after that.