Cabal build cardano-cli cardano-node "GHC"

I am on Centos7 and when i run the command to build the node i receive

cabal: Cannot find the program ‘ghc’. User-specified path ‘ghc-8.10.2’ does
not refer to an executable and the program is not on the system path.

any ideas what i am missing? i followed the docs to T. ran into the same issue lastnight, wiped my VM and started fresh. same issue again. Thank you!

here is my bashrc file
[ -f “/root/.ghcup/env” ] && source “/root/.ghcup/env” # ghcup-env
PATH=/root/.local/bin:/root/.cabal/bin:/root/.ghcup/bin:/sbin:/bin:/usr/sbin:/usr/bin
export LD_LIBRARY_PATH=/usr/local/lib:
export NODE_HOME=/root/cardano-my-node
export NODE_CONFIG=mainnet
export NODE_BUILD_NUM=5821110
export PATH="~/.cabal/bin:$PATH"
export PATH="~/.local/bin:$PATH"
PATH=/root/.local/bin:~/.local/bin:~/.cabal/bin:/root/.local/bin:/root/.cabal/bin:/root/.ghcup/bin:/sbin:/bin:/usr/sbin:/usr/bin

Hi!

Do you have a link to the documentation? thx

Hello, I do not see /usr/local/bin in your $PATH, it might be the reason for your trouble.

+ you might want to add /usr/local/sbin also…

By the way, why are you building as root ?

I think you might have problems running on CentOS. CentOS is another linux distro that doesn’t like bleeding edge. If you want the Red Hat experience, try Fedora, it’s the bleeding edge version of CentOS.

HTH

How does it relate to this issue ? I mean as far as I know, every GNU/Linux distrib have the very same $PATH expectations. The message is pretty self-explanatory, don’t you think ?

As for the choice Fedora/CentOS, you may be right, but CentOS is designed for production environments, to be safe and stable. To advise one over the other would require to know more about his needs, whether it is for experimentation on a laptop or running a node 24/7 with as much uptime as possible and security considerations in play.

Good morning Raph

It’s not down to $PATH, it’s down to the system libraries (libc, glibc etc). CentOS is designed for production environments by using well tested, long lived system libraries. These well tested, long lived libraries are not appropriate in this instance. Fedora feeds CentOS, so is the more modern distro with more recent libraries. ghc requires glibc-2.29, CentOS 7 supplies an ancient 2.18 version. As far as I can tell, your needs are to run a cardano node? I advised with that in mind.

Good morning. That’s true, my point was merely that in this instance the Haskell compiler binary wasn’t found, because it sits in /usr/local/bin. You’re also right in saying it will require more work to make a cardano-node run on CentOS. However with bleeding edge libs often come bleeding edge bugs and with Fedora you’ll get a lot of them, not only those required by cardano-node. It’s possible to have two versions of the same library at any given time, as long as they have different names and files. That said I’m also using a `modern’ distribution as I don’t require a production-ready environment.

Aha! I’d missed that entirely. This is a case of “real work” leeching into “hobby work”. I saw CentOS mentioned, shuddered, and thought “Well that’s not gonna work on CentOS”! CentOS is causing me all sorts of grief in “real work” day!

Have a good one!

Again, you’re right, I believe nobody is in his right mind would consider using CentOS for fun :smirk_cat:

Have a nice day

i switched to Ubunutu

Simply close down your terminal and open a fresh window!