# Stake pool node help - “cannot find the ghc”

**URL:** <https://forum.cardano.org/t/stake-pool-node-help-cannot-find-the-ghc/60614>\
**Category:** Operate a Stake Pool\
**Tags:** cardano\
**Created:** [11 May 2021 23:19 UTC](https://forum.cardano.org/t/stake-pool-node-help-cannot-find-the-ghc/60614 "2021-05-11T23:19:51Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![memix](https://avatars.discourse-cdn.com/v4/letter/m/48db29/32.png) [@memix](https://forum.cardano.org/u/memix)\
**Post date:** [11 May 2021 23:19 UTC](https://forum.cardano.org/t/stake-pool-node-help-cannot-find-the-ghc/60614/1 "2021-05-11T23:19:51Z")

</div>

I am building a new node. all goes well until i run this command and get a ghc error.

cabal build cardano-cli cardano-node

[root@ADA-host cardano-node]# cabal build cardano-cli cardano-node  
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 why it would not be able to find the program up to this point?

---

<div class="post-metadata">

**Author:** ![memix](https://avatars.discourse-cdn.com/v4/letter/m/48db29/32.png) [@memix](https://forum.cardano.org/u/memix)\
**Post date:** [11 May 2021 23:50 UTC](https://forum.cardano.org/t/stake-pool-node-help-cannot-find-the-ghc/60614/2 "2021-05-11T23:50:47Z")

</div>

I am on Centos7 by the way

---

<div class="post-metadata">

**Author:** ![ToTheMoonADA](https://avatars.discourse-cdn.com/v4/letter/t/b19c9b/32.png) [@ToTheMoonADA](https://forum.cardano.org/u/ToTheMoonADA)\
**Post date:** [12 May 2021 00:28 UTC](https://forum.cardano.org/t/stake-pool-node-help-cannot-find-the-ghc/60614/3 "2021-05-12T00:28:41Z")

</div>

Did you download ghc and install/unpack it? Looks like you didn’t do install ghc/lib or the path is incorrect.  
You can reference the coincash guide but swap out the commands to be centos vs ubuntu as each os is slightly different…

[https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node#1-install-cabal-and-ghc](https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node#1-install-cabal-and-ghc)

here the official from haskell for ghc -  
[https://www.haskell.org/ghc/download\_ghc\_8\_10\_4.html](https://www.haskell.org/ghc/download_ghc_8_10_4.html)

---

<div class="post-metadata">

**Author:** ![memix](https://avatars.discourse-cdn.com/v4/letter/m/48db29/32.png) [@memix](https://forum.cardano.org/u/memix)\
**Post date:** [12 May 2021 02:13 UTC](https://forum.cardano.org/t/stake-pool-node-help-cannot-find-the-ghc/60614/4 "2021-05-12T02:13:47Z")

</div>

Thank you! looks like i ran the command from an old article and used cabal configure --with-compiler=ghc-8.10.2 instead of cabal configure --with-compiler=ghc-8.10.4

now i am getting  
, these were the  
goals I’ve had most trouble fulfilling: cardano-crypto-class

troubleshooting that now.

---

<div class="post-metadata">

**Author:** ![memix](https://avatars.discourse-cdn.com/v4/letter/m/48db29/32.png) [@memix](https://forum.cardano.org/u/memix)\
**Post date:** [12 May 2021 02:15 UTC](https://forum.cardano.org/t/stake-pool-node-help-cannot-find-the-ghc/60614/5 "2021-05-12T02:15:04Z")

</div>

cabal build cardano-cli cardano-node  
Warning: Requested index-state 2021-03-15T00:00:00Z is newer than  
‘[hackage.haskell.org](http://hackage.haskell.org)’! Falling back to older state (2021-03-14T23:47:09Z).  
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

---

<div class="post-metadata">

**Author:** ![memix](https://avatars.discourse-cdn.com/v4/letter/m/48db29/32.png) [@memix](https://forum.cardano.org/u/memix)\
**Post date:** [12 May 2021 02:47 UTC](https://forum.cardano.org/t/stake-pool-node-help-cannot-find-the-ghc/60614/6 "2021-05-12T02:47:04Z")

</div>

a little progress and still failure

Failed to build Win32-network-0.1.0.0.  
Build log (  
/root/.cabal/logs/ghc-8.10.4/Win32-network-0.1.0.0-ea777a1112c9a903f5a922e05d3ca5b37daa02b493554559e7d31acd8a4ddd0d.log  
):  
Configuring library for Win32-network-0.1.0.0…  
Preprocessing library for Win32-network-0.1.0.0…  
Building library for Win32-network-0.1.0.0…  
[1 of 1] Compiling System.IOManager ( src/System/IOManager.hs, dist/build/System/IOManager.o, dist/build/System/IOManager.dyn\_o )  
/bin/ld.gold: error: cannot find -lgmp  
collect2: error: ld returned 1 exit status  
`gcc' failed in phase `Linker’. (Exit code: 1)  
cabal: Failed to build Diff-0.4.0 (which is required by  
test:cardano-cli-golden from cardano-cli-1.27.0). See the build log above for  
details.  
Failed to build StateVar-1.2.1 (which is required by test:cardano-node-test  
from cardano-node-1.27.0, exe:cardano-node from cardano-node-1.27.0 and  
others). See the build log above for details.  
Failed to build Win32-network-0.1.0.0 (which is required by  
test:cardano-node-test from cardano-node-1.27.0, exe:cardano-node from  
cardano-node-1.27.0 and others). See the build log above for details.

any ideas on this one?

---

<div class="post-metadata">

**Author:** ![memix](https://avatars.discourse-cdn.com/v4/letter/m/48db29/32.png) [@memix](https://forum.cardano.org/u/memix)\
**Post date:** [12 May 2021 03:50 UTC](https://forum.cardano.org/t/stake-pool-node-help-cannot-find-the-ghc/60614/7 "2021-05-12T03:50:14Z")

</div>

got it! i needed to run the below installs in addition to what was listed in the HowTo articles

yum python3 zlib-devel tmux ncurses-compat-libs rsync systemd-devel gmp-devel.x86\_64 gcc gcc-c++ tar ncurses-devel

the build is running perfectly now

---

<div class="post-metadata">

**Author:** ![laplasz](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/laplasz/32/15238_2.png) [@laplasz](https://forum.cardano.org/u/laplasz)\
**Post date:** [12 May 2021 13:34 UTC](https://forum.cardano.org/t/stake-pool-node-help-cannot-find-the-ghc/60614/8 "2021-05-12T13:34:30Z")

</div>

Hi!

you can “close” the topic by mark one of the answer as solution - also the title of the topic can be improved by adding the error message itself. like - stake pool server help - “cannot find the ghc”

---

<div class="post-metadata">

**Author:** ![ToTheMoonADA](https://avatars.discourse-cdn.com/v4/letter/t/b19c9b/32.png) [@ToTheMoonADA](https://forum.cardano.org/u/ToTheMoonADA)\
**Post date:** [12 May 2021 16:37 UTC](https://forum.cardano.org/t/stake-pool-node-help-cannot-find-the-ghc/60614/9 "2021-05-12T16:37:26Z")

</div>

glad to hear. best of luck and wishes!

---

<div class="post-metadata">

**Author:** ![arun\_vm](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/arun_vm/32/51559_2.png) [@arun\_vm](https://forum.cardano.org/u/arun_vm)\
**Post date:** [6 May 2022 07:02 UTC](https://forum.cardano.org/t/stake-pool-node-help-cannot-find-the-ghc/60614/10 "2022-05-06T07:02:48Z")

</div>

> [@memix](#):
>
> python3 zlib-devel tmux ncurses-compat-libs rsync systemd-devel gmp-devel.x86\_64 gcc gcc-c++ tar ncurses-devel

I am using ubuntu
