Error 127 installing GHC.. libtinfo.so.5 Missing

https://cardano-foundation.gitbook.io/stake-pool-course/stake-pool-guide/getting-started/install-node
Following this tutorial and I’ve encountered an error during the ghc install.

/usr/local/lib/ghc-8.10.2/bin/ghc-pkg: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

I’ve seen others running AWS AMI Linux instances with this issue and it seems there’s a workaround.

However, I’d like to know what is going on here. Why is this error encountered and what does the fix described in the thread above do? I sourced the .bashrc file with the applied fix and it didn’t appear to do anything, do I need to undo that edit somehow if I apply the fix I found below? What does the fix below do? What the hell is a shared low-level terminfo library and why do I need to install it?

sudo apt install libtinfo5
cd ghc-8.10.2
./configure
sudo make install
cd …

Totally new to linux and AWS in general, trying my best to really understand what it is I’m doing in this tutorial and learn as much about Linux as I can as I proceed. Any help or insight here is appreciated.

1 Like

New error, next step. The way I’m reading this is A. I either have already applied this step. Or B, it is somehow related to the ghc install going wrong. or C. Libsodium is installed incorrectly or not at all. Although when I use:
ls Libsodium
it appears the directory is populated with libsodium files…

Any thoughts?

cabal build cardano-node cardano-cli
Warning: Requested index-state2021-01-10T00:00:00Z is newer than
hackage.haskell.org’! Falling back to older state (2021-01-09T22:55:53Z).
Resolving dependencies…
cabal: Could not resolve dependencies:
[__0] next goal: cardano-crypto-class (user goal)
[__0] rejecting: cardano-crypto-class-2.0.0 (conflict: pkg-config package
libsodium-any, not found in the pkg-config database)
[__0] fail (backjumping, conflict set: cardano-crypto-class)
After searching the rest of the dependency tree exhaustively, these were the
goals I’ve had most trouble fulfilling: cardano-crypto-class

Hi!

I think, C.

I’m thinking so too. I’ve done the libsodium install process and it seems to have installed correctly. Wondering if there is an update to libsodium that isn’t being mentioned in the pool school tutorial. Will look into it and let you know!

Thanks for taking the time to read and respond!

https://docs.cardano.org/projects/cardano-node/en/latest/getting-started/install.html
Probably very similar guide - but also can take a look on this one

Will do, thank you!

I’m getting somewhere but not out of the woods yet. New error:
Resolving dependencies…
cabal: Could not resolve dependencies:
[__0] trying: Win32-network-0.1.0.0 (user goal)
[__1] trying: base-4.14.1.0/installed-4.14.1.0 (dependency of Win32-network)
[__2] trying: lobemo-scribe-systemd-0.1.0.0 (user goal)
[__3] next goal: libsystemd-journal (dependency of lobemo-scribe-systemd)
[__3] rejecting: libsystemd-journal-1.4.5 (conflict: pkg-config package
libsystemd==209 || >209, not found in the pkg-config database)
[__3] rejecting: libsystemd-journal-1.4.4 (conflict:
base==4.14.1.0/installed-4.14.1.0, libsystemd-journal => base>=4.6 && <4.13)
[__3] skipping: 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
(has the same characteristics that caused the previous version to fail:
excludes ‘base’ version 4.14.1.0)
[__3] fail (backjumping, conflict set: base, libsystemd-journal,
lobemo-scribe-systemd)
After searching the rest of the dependency tree exhaustively, these were the
goals I’ve had most trouble fulfilling: base, libsystemd-journal,
lobemo-scribe-systemd, Win32-network
Try running with --minimize-conflict-set to improve the error message.

probably related topic:

1 Like

Awesome, thank you that was the ticket. Although, through scouring forums for something similar I stumbled upon this thread; https://github.com/input-output-hk/cardano-node/issues/1200
I ran:

scripts/gen-cabal-nosystemd.sh
cabal build --project-file=cabal.nosystemd.project cardano-cli cardano-node

I assume this will just ignore that systemd dependency. Build seems to be going just fine so far. :grin:
Going to mark your answer as a solution for those that come after me looking for resolution on the same things! Thanks for your help!

1 Like

Holy **** my node is running.

1 Like

good to here - and do you know which step you missed - this one? sudo apt-get install libssl-dev libtinfo-dev libsystemd-dev zlib1g-dev -y