# Can't compile cardano-node from source

**URL:** <https://forum.cardano.org/t/cant-compile-cardano-node-from-source/61225>\
**Category:** Setup a Stake Pool\
**Created:** [15 May 2021 21:26 UTC](https://forum.cardano.org/t/cant-compile-cardano-node-from-source/61225 "2021-05-15T21:26:32Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jregalado](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jregalado](https://forum.cardano.org/u/jregalado)\
**Post date:** [15 May 2021 21:26 UTC](https://forum.cardano.org/t/cant-compile-cardano-node-from-source/61225/1 "2021-05-15T21:26:32Z")

</div>

So I am really confused on how to run a stake pool. The documentation just is not making sense to me.

I am following instructions to compile cardano-node from source using both nix and cabal (Why two different ways to build?). More specifically I am following, step by step:

cabal  
[https://docs.cardano.org/projects/cardano-node/en/latest/getting-started/install.html](https://docs.cardano.org/projects/cardano-node/en/latest/getting-started/install.html)

nix  
[https://docs.cardano.org/projects/cardano-node/en/latest/getting-started/building-the-node-using-nix.html](https://docs.cardano.org/projects/cardano-node/en/latest/getting-started/building-the-node-using-nix.html)

The first method (cabal) fails with:  
cabal: Could not resolve dependencies:  
[\_\_0] trying: Win32-network-0.1.0.0 (user goal)  
[\_\_1] trying: base-4.12.0.0/installed-4.12.0.0 (dependency of Win32-network)  
[\_\_2] next goal: cardano-api (user goal)  
[\_\_2] rejecting: cardano-api-1.27.0 (conflict:  
base==4.12.0.0/installed-4.12.0.0, cardano-api =\> base\>=4.14 && \<4.15)  
[\_\_2] fail (backjumping, conflict set: base, cardano-api)  
After searching the rest of the dependency tree exhaustively, these were the  
goals I’ve had most trouble fulfilling: base, Win32-network, cardano-api

When building with nix process ends normally, but I don’t understand whan coomes out of it. I expect to find executables like cardano-cli but the only thing I see is a sybolic link called “mainnet-node-local”. The tutorial explicitly says to call ./mainnet-node-local but of course that makes no sense, mainnet-node-local is a folder that contains bin/cardano-node-mainnet. Is this the same as cardano-cli?

I am sorry if these are basic questions, but I am extremely frustrated. Why are the commands in the documentation not working? What exactly am I expecting as output, one executable, 2 3?

I am trying to install on ubuntu 20.04, 16GB Ram, 8 cpu’s, all dependencies installed as per documentation.

---

<div class="post-metadata">

**Author:** ![Alexd1985](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/alexd1985/32/23759_2.png) [@Alexd1985](https://forum.cardano.org/u/Alexd1985)\
**Post date:** [15 May 2021 21:36 UTC](https://forum.cardano.org/t/cant-compile-cardano-node-from-source/61225/2 "2021-05-15T21:36:23Z")

</div>

Ok, why don’t u try my topic?

> [@How to set up a POOL in a few minutes - and register using CNTOOLS](https://forum.cardano.org/t/how-to-set-up-a-pool-in-a-few-minutes-and-register-using-cntools/48767):
>
> Hello everybody, Have you thinking to run a Cardano POOL but but you don’t have advanced knowledge in linux? No problem! Today I will show you how to setup a Cardano POOL using CNTOOLS in just a few minutes/steps: But first, few recommendations for security of the nodes (should be applied on all nodes): create an username/password, change the default ssh connections and deactivate ssh for root user sudo adduser example where example is your new user ; here is recomanded to use a STRONG…

You will thank you later 🙂

But if u decided to follow the guide, perform a new fresh installation of server

---

<div class="post-metadata">

**Author:** ![jregalado](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jregalado](https://forum.cardano.org/u/jregalado)\
**Post date:** [15 May 2021 21:40 UTC](https://forum.cardano.org/t/cant-compile-cardano-node-from-source/61225/3 "2021-05-15T21:40:10Z")

</div>

Hi Alex, I was checking your gists earlier. To be honest, all of this is coming like a steamroller. I might be biting too much of a bullet here.

Even though I am a new to crypto, I consider myself quite knowledgeable in \*nix stuff.

I am trying to approach this step by step and naturally my first thought was: “Let’s build this thing first”. Boy oh boy was I wrong. I’ll go through your topic, thanks for the help.

---

<div class="post-metadata">

**Author:** ![Alexd1985](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/alexd1985/32/23759_2.png) [@Alexd1985](https://forum.cardano.org/u/Alexd1985)\
**Post date:** [15 May 2021 21:42 UTC](https://forum.cardano.org/t/cant-compile-cardano-node-from-source/61225/4 "2021-05-15T21:42:11Z")

</div>

When u will build the node just replace 1.25.1 version with 1.27.0

---

<div class="post-metadata">

**Author:** ![jregalado](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jregalado](https://forum.cardano.org/u/jregalado)\
**Post date:** [15 May 2021 22:05 UTC](https://forum.cardano.org/t/cant-compile-cardano-node-from-source/61225/5 "2021-05-15T22:05:33Z")

</div>

Quick question, I have enables ssh login only via public key authentication. This has the effect that the 2fa authentication step is skipped. Is this expected or did I configure something wrongly?

---

<div class="post-metadata">

**Author:** ![Alexd1985](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/alexd1985/32/23759_2.png) [@Alexd1985](https://forum.cardano.org/u/Alexd1985)\
**Post date:** [15 May 2021 22:06 UTC](https://forum.cardano.org/t/cant-compile-cardano-node-from-source/61225/6 "2021-05-15T22:06:34Z")

</div>

It is ok, u did it well

---

<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:** [15 May 2021 22:13 UTC](https://forum.cardano.org/t/cant-compile-cardano-node-from-source/61225/7 "2021-05-15T22:13:40Z")

</div>

> [@jregalado](#):
>
> base==4.12.0.0/installed-4.12.0.0, cardano-api =\> base\>=4.14 && \<4.15

might you try to use ghc version 8.6.5

> <https://github.com/input-output-hk/cardano-node/issues/1251>
>
> \*\*Internal/Exernal\*\*
> \*External\* otherwise.
> 
> \*\*Summary\*\*
> Simple cabal v2-bu…ild fails to detect OS.
> 
> \*\*Steps to reproduce\*\*
> Steps to reproduce the behavior:
> 
> cabal v2-build all
> Warning: Requested index-state2020-04-01T00:00:00Z is newer than
> 'hackage.haskell.org'! Falling back to older state (2020-03-31T22:47:49Z).
> Resolving dependencies...
> cabal: Could not resolve dependencies:
> \[\_\_0\] trying: Win32-network-0.1.0.0 (user goal)
> \[\_\_1\] next goal: base (dependency of Win32-network)
> \[\_\_1\] rejecting: base-4.14.0.0/installed-4.14.0.0 (conflict: Win32-network =\>
> base\>=4.5 && \<4.13)
> \[\_\_1\] rejecting: base-4.12.0.0, base-4.11.1.0, base-4.11.0.0, base-4.10.1.0,
> base-4.10.0.0, base-4.9.1.0, base-4.9.0.0, base-4.8.2.0, base-4.8.1.0,
> base-4.8.0.0, base-4.7.0.2, base-4.7.0.1, base-4.7.0.0, base-4.6.0.1,
> base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0, base-4.4.0.0,
> base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1, base-4.2.0.0,
> base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1 (constraint from
> non-upgradeable package requires installed instance)
> \[\_\_1\] fail (backjumping, conflict set: Win32-network, base)
> After searching the rest of the dependency tree exhaustively, these were the
> goals I've had most trouble fulfilling: base, Win32-network
> 
> \*\*Expected behavior\*\*
> It should detect the os automatically.
> 
> \*\*System info (please complete the following information):\*\*
> Output of uname -a: 
> Linux lkbh-1 4.15.0-99-generic #100-Ubuntu SMP Wed Apr 22 20:32:56 UTC 2020 x86\_64 x86\_64 x86\_64 GNU/Linux
> 
> \*\*Screenshots and attachments\*\*
> \- Just git repo master branch of cardano-node

or just skip the compilation and download the binaries from github:

> **[GitHub - input-output-hk/cardano-node: The core component that is used to...](https://github.com/input-output-hk/cardano-node#linux-executable)**
>
> The core component that is used to participate in a Cardano decentralised blockchain. - GitHub - input-output-hk/cardano-node: The core component that is used to participate in a Cardano decentrali...

---

<div class="post-metadata">

**Author:** ![jregalado](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jregalado](https://forum.cardano.org/u/jregalado)\
**Post date:** [15 May 2021 22:16 UTC](https://forum.cardano.org/t/cant-compile-cardano-node-from-source/61225/8 "2021-05-15T22:16:52Z")

</div>

Same ol mistake man, everything was going great.

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] trying: Win32-network-0.1.0.0 (user goal)  
[\_\_1] trying: base-4.12.0.0/installed-4.12.0.0 (dependency of Win32-network)  
[\_\_2] next goal: cardano-api (user goal)  
[\_\_2] rejecting: cardano-api-1.27.0 (conflict:  
base==4.12.0.0/installed-4.12.0.0, cardano-api =\> base\>=4.14 && \<4.15)  
[\_\_2] fail (backjumping, conflict set: base, cardano-api)  
After searching the rest of the dependency tree exhaustively, these were the  
goals I’ve had most trouble fulfilling: base, Win32-network, cardano-api

---

<div class="post-metadata">

**Author:** ![jregalado](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jregalado](https://forum.cardano.org/u/jregalado)\
**Post date:** [15 May 2021 22:18 UTC](https://forum.cardano.org/t/cant-compile-cardano-node-from-source/61225/9 "2021-05-15T22:18:09Z")

</div>

Yeah, I was using a newer version and switched to 8.6.5 but I am still getting complains about “base, Win32-network, cardano-api” 7 straight hours trying to make it work at no avail ☹

---

<div class="post-metadata">

**Author:** ![jregalado](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jregalado](https://forum.cardano.org/u/jregalado)\
**Post date:** [15 May 2021 22:19 UTC](https://forum.cardano.org/t/cant-compile-cardano-node-from-source/61225/10 "2021-05-15T22:19:28Z")

</div>

> [@laplasz](#):
>
> or just skip the compilation and download the binaries from github:

I might have to do that, but I would really like to be able to complete the build process. Don’t wanna trust no binary.

---

<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:** [15 May 2021 22:20 UTC](https://forum.cardano.org/t/cant-compile-cardano-node-from-source/61225/11 "2021-05-15T22:20:18Z")

</div>

I have an Ubuntu 20.04 - will try to go through on this install again…

---

<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:** [15 May 2021 22:21 UTC](https://forum.cardano.org/t/cant-compile-cardano-node-from-source/61225/12 "2021-05-15T22:21:14Z")

</div>

> [@jregalado](#):
>
> Don’t wanna trust no binary

you mean nobody? those binaries are official build from IOHK.

---

<div class="post-metadata">

**Author:** ![jregalado](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jregalado](https://forum.cardano.org/u/jregalado)\
**Post date:** [15 May 2021 23:14 UTC](https://forum.cardano.org/t/cant-compile-cardano-node-from-source/61225/13 "2021-05-15T23:14:07Z")

</div>

Yeah, precompiled seems to be my only option. Can’t shake the feeling of defeat though. Weird that it’s so hard to simply build a program from source.

---

<div class="post-metadata">

**Author:** ![rdlrt](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/rdlrt/32/9098_2.png) [@rdlrt](https://forum.cardano.org/u/rdlrt)\
**Post date:** [16 May 2021 01:07 UTC](https://forum.cardano.org/t/cant-compile-cardano-node-from-source/61225/14 "2021-05-16T01:07:49Z")

</div>

> [@jregalado](#):
>
> Weird that it’s so hard to simply build a program from source.

Thousands have built it, it’s not so hard - but you’d want to ensure ghc --version says (8.10.2 - 8.10.4) and cabal --version is 3.4.0, and you’re on latest node release tag

> [@laplasz](#):
>
> might you try to use ghc version 8.6.5

Support for 8.6.5 is completely dropped as of 1.27

---

<div class="post-metadata">

**Author:** ![jregalado](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jregalado](https://forum.cardano.org/u/jregalado)\
**Post date:** [16 May 2021 10:22 UTC](https://forum.cardano.org/t/cant-compile-cardano-node-from-source/61225/15 "2021-05-16T10:22:43Z")

</div>

> Thousands have built it, it’s not so hard - but you’d want to ensure ghc --version says (8.10.2 - 8.10.4) and cabal --version is 3.4.0, and you’re on latest node release tag

That’s what is frustrating me the most, I know it shouldn’t be that complicated.

Really confused about dependencies, tried and failed with ghc-10.2 and got the aforementioned errors. In the forum I saw using 8.6.5 should do the trick, but it didn’t.

I am just really confused because I have been following the documentation step by step.

I’ll keep grinding.

---

<div class="post-metadata">

**Author:** ![rdlrt](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/rdlrt/32/9098_2.png) [@rdlrt](https://forum.cardano.org/u/rdlrt)\
**Post date:** [16 May 2021 13:41 UTC](https://forum.cardano.org/t/cant-compile-cardano-node-from-source/61225/16 "2021-05-16T13:41:20Z")

</div>

You need to be precise, the session that you’re running in should list accurate ghc as well as cabal version at command line (to avoid any errors like multiple versions being available, and one in your session’s $PATH being incorrect) as per my previous message, and then run the buuld commands from the same session

---

<div class="post-metadata">

**Author:** ![jregalado](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jregalado](https://forum.cardano.org/u/jregalado)\
**Post date:** [17 May 2021 05:05 UTC](https://forum.cardano.org/t/cant-compile-cardano-node-from-source/61225/17 "2021-05-17T05:05:42Z")

</div>

Yeah sorry about that. Post can not be edited anymore.

Running  
ghc 8.10.4  
cabal 3.4.0

---

<div class="post-metadata">

**Author:** ![jregalado](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jregalado](https://forum.cardano.org/u/jregalado)\
**Post date:** [17 May 2021 08:02 UTC](https://forum.cardano.org/t/cant-compile-cardano-node-from-source/61225/18 "2021-05-17T08:02:21Z")

</div>

Got it to build!! Thanks for the help.

I am now running into the same error as: [CNTools and gLiveView error failed to load common env file](https://forum.cardano.org/t/cntools-and-gliveview-error-failed-to-load-common-env-file/59693)

It’s a bit different though  
Guild LiveView version check…  
Failed to query protocol-parameters from node, not yet fully started?  
ERROR: CNTools failed to load common env file  
Please verify set values in ‘User Variables’ section in env file or log an issue on GitHub

Doing some reading to see how to solve it.  
sudo systemctl status cnode, shows the node is running at high CPU load

---

<div class="post-metadata">

**Author:** ![rdlrt](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/rdlrt/32/9098_2.png) [@rdlrt](https://forum.cardano.org/u/rdlrt)\
**Post date:** [17 May 2021 09:42 UTC](https://forum.cardano.org/t/cant-compile-cardano-node-from-source/61225/19 "2021-05-17T09:42:17Z")

</div>

Having just started node, you might want to wait for the node to sync through to shelley fork (on mainnet that’s epoch 208) , as until then some of the CLI queries will not resolve - also, it wouldn’t create the socket file for communication right after launching the node 🙂

PS: Since you’re using CNTools, as documented on guild doco home page, it is strongly recommended that you’d go through the setup on testnet first.

---

<div class="post-metadata">

**Author:** ![jregalado](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jregalado](https://forum.cardano.org/u/jregalado)\
**Post date:** [17 May 2021 10:05 UTC](https://forum.cardano.org/t/cant-compile-cardano-node-from-source/61225/20 "2021-05-17T10:05:37Z")

</div>

Gotcha,

> guild doco home page

Is that, this: [Guild Operators](https://cardano-community.github.io/guild-operators)

Thanks for the replies, I am still quite overwhelmed by all the resources. For example I haven’t found exactly the differences between testnet and mainnet, excluding the obvious fact that one is for testing.

[Next page](https://forum.cardano.org/t/cant-compile-cardano-node-from-source/61225.md?page=2)
