<p>I strongly urge you to consider building using nix. I apologize if this wasn't the answer you were asking for, but it is probably the best solution for building the Cardano node.</p>
<p>I went through so many issues when trying to build from source it would make this issue seem trivial. Also, would like to note that by adding the binaries in step 2, I shaved 4hrs off the build time, and that is on a machine with a AMD 3900XT with 12 cores. Building without binaries on an average machine could take upwards of 12hrs.</p>
<p><a href="https://docs.cardano.org/projects/cardano-node/en/latest/getting-started/building-the-node-using-nix.html" rel="nofollow noreferrer">https://docs.cardano.org/projects/cardano-node/en/latest/getting-started/building-the-node-using-nix.html</a></p>
<p><strong>By using nix to build the Cardano node, you really only have 3 steps to follow:</strong></p>
<p>1.</p>
<pre><code>curl -L https://nixos.org/nix/install &gt; install-nix.sh 
chmod +x install nix.sh
./install-nix.sh
</code></pre>
<ol start="2">
<li>sudo mkdir -p /etc/nix
cat &lt;&lt;EOF | sudo tee /etc/nix/nix.conf
substituters = <a href="https://cache.nixos.org" rel="nofollow noreferrer">https://cache.nixos.org</a> <a href="https://hydra.iohk.io" rel="nofollow noreferrer">https://hydra.iohk.io</a>
trusted-public-keys = iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
EOF</li>
<li></li>
</ol>
<pre><code>git clone https://github.com/input-output-hk/cardano-node
cd cardano-node
nix-build -A scripts.mainnet.node -o mainnet-node-local
./mainnet-node-local
</code></pre>
<p>Again, sorry if this wasn't the solution to build the cardano node using but I had nothing but problems using Cabal during the Plutus Pioneer Program.</p>
<p>Good luck!</p>

CC BY-SA 4.0
2021-06-14T08:45:55.637Z
Only to confirm that the first times I built cardano-node without the IOHK binary cache set for nix, it was taking more than 10 hours.
Stephane Rolland
CC BY-SA 4.0
2021-06-14T17:23:52.663Z
Thanks for coming back to me. Unfortunately still no joy. I got all the way through the installation using the method you stated above and still was unable to access the CLI. Am I being thick or is there something I'm missing here?
Wether
CC BY-SA 4.0
2021-06-14T21:20:24.763Z
Could you please elaborate a little? Was nix successfully installed via step 1? If so, did you add the binaries in step 2 properly?
intrinsic-values
CC BY-SA 4.0
2021-06-14T04:33:31.640Z
2022-08-10T08:43:21.407Z
2022-08-10T08:43:21.407Z
intrinsic-values
<p>Something definitely wrong. I can build <code>node</code> from scratch (with a clean cabal cache) in about an hour (on Linux x86_64). Not sure how long this would take on an M1 Mac.</p>
<p>I also disagree with <a href="https://cardano.stackexchange.com/users/1894/intrinsic-values">/u/intrinsic-values</a> on the Nix issue. IMO, Nix solves some problems that I do not have and creates a bunch of new problems.</p>

CC BY-SA 4.0
2022-08-09T23:42:25.273Z
2022-08-09T23:42:25.273Z
Erik de Castro Lopo
<p>I'm setting up a node on my mac. It's been stuck on &quot;Building     network-3.1.2.1 (all, legacy fallback)&quot; for a couple of hours now.</p>
<p>Is this normal, or have I got something wrong?</p>
<p>Thanks<img src="https://i.sstatic.net/ZTPqX.png" alt="enter image description here" /></p>

CC BY-SA 4.0
2021-06-11T09:50:55.617Z
Could you please give some more details on what you're doing? How did you set up your node (Daedalus, built from source, IOHK binaries...)? And maybe a screenshot would be helpful too.
eddex
CC BY-SA 4.0
2021-06-11T10:01:02.130Z
Hi - Thanks for the response. I'm installing the node from source https://docs.cardano.org/projects/cardano-node/en/latest/getting-started/install.html - I'll add a screenshot to the original post. - Thanks again.
Wether
CC BY-SA 4.0
2021-06-11T10:47:10.467Z
Building the node can take a while, but from my experience it shouldn't take hours even on a less powerful system. If you just want to start a node, you can also try to use the pre-built binaries from https://hydra.iohk.io/job/Cardano/cardano-node/cardano-node-macos/latest-finished
eddex
CC BY-SA 4.0
2021-06-11T11:28:01.497Z
@eddex- Thanks again for your help. I've tried to use the prebuilt binary but it's returning the error bash: command ‘?? is not installed; please install it and try again"
Wether
CC BY-SA 4.0
2021-06-12T13:07:06.133Z
I'd advise to head over to https://t.me/CardanoStakePoolWorkgroup on Telegram and ask for help there, maybe mention what sort of machine spec (e.g. how much memory you have) you're dealing with and what version of ghc / cabal you're trying to build the cardano-node code with. FYI Mac binaries for latest stable release can be found here: https://hydra.iohk.io/build/6263000/download/1/cardano-node-1.27.0-macos.tar.gz
Homer J
CC BY-SA 4.0
2021-06-12T18:59:46.343Z
Hi @HomerJ - Thanks for the response. I've tried building using the binary and am getting error: path '/var/folders/yy/bd1g3c_53z1_hf67hnb5j7n40000gn/T/' has a trailing slash
Wether
<cardano-node><node>
Time required to build node OSX/Cabal
# Time required to build node OSX/Cabal

(Asked by: username_0 on 2021-06-11)

I'm setting up a node on my mac. It's been stuck on "Building network-3.1.2.1 (all, legacy fallback)" for a couple of hours now.

Is this normal, or have I got something wrong?

Thanks![enter image description here](https://i.sstatic.net/ZTPqX.png)

**Tags:** cardano-node, node
> **Comments:**
> **username_1**: Could you please give some more details on what you're doing? How did you set up your node (Daedalus, built from source, IOHK binaries...)? And maybe a screenshot would be helpful too.  
> **username_0**: Hi - Thanks for the response. I'm installing the node from source https://docs.cardano.org/projects/cardano-node/en/latest/getting-started/install.html - I'll add a screenshot to the original post. - Thanks again.  
> **username_1**: Building the node can take a while, but from my experience it shouldn't take hours even on a less powerful system. If you just want to start a node, you can also try to use the pre-built binaries from https://hydra.iohk.io/job/Cardano/cardano-node/cardano-node-macos/latest-finished  
> **username_0**: @eddex- Thanks again for your help. I've tried to use the prebuilt binary but it's returning the error bash: command ‘?? is not installed; please install it and try again"  
> **username_2**: I'd advise to head over to https://t.me/CardanoStakePoolWorkgroup on Telegram and ask for help there, maybe mention what sort of machine spec (e.g. how much memory you have) you're dealing with and what version of ghc / cabal you're trying to build the cardano-node code with. FYI Mac binaries for latest stable release can be found here: https://hydra.iohk.io/build/6263000/download/1/cardano-node-1.27.0-macos.tar.gz  
> **username_0**: Hi @HomerJ - Thanks for the response. I've tried building using the binary and am getting error: path '/var/folders/yy/bd1g3c_53z1_hf67hnb5j7n40000gn/T/' has a trailing slash  

---

## 2 answers

### Answer by username_3 on 2021-06-14. Score: 1

I strongly urge you to consider building using nix. I apologize if this wasn't the answer you were asking for, but it is probably the best solution for building the Cardano node.
I went through so many issues when trying to build from source it would make this issue seem trivial. Also, would like to note that by adding the binaries in step 2, I shaved 4hrs off the build time, and that is on a machine with a AMD 3900XT with 12 cores. Building without binaries on an average machine could take upwards of 12hrs.
https://docs.cardano.org/projects/cardano-node/en/latest/getting-started/building-the-node-using-nix.html
By using nix to build the Cardano node, you really only have 3 steps to follow:
1.
curl -L https://nixos.org/nix/install > install-nix.sh 
chmod +x install nix.sh
./install-nix.sh


sudo mkdir -p /etc/nix
cat <https://cache.nixos.org https://hydra.iohk.io
trusted-public-keys = iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
EOF


git clone https://github.com/input-output-hk/cardano-node
cd cardano-node
nix-build -A scripts.mainnet.node -o mainnet-node-local
./mainnet-node-local

Again, sorry if this wasn't the solution to build the cardano node using but I had nothing but problems using Cabal during the Plutus Pioneer Program.
Good luck!

> **Comments:**
> **username_4**: Only to confirm that the first times I built cardano-node without the IOHK binary cache set for nix, it was taking more than 10 hours.  
> **username_0**: Thanks for coming back to me. Unfortunately still no joy. I got all the way through the installation using the method you stated above and still was unable to access the CLI. Am I being thick or is there something I'm missing here?  
> **username_3**: Could you please elaborate a little? Was nix successfully installed via step 1? If so, did you add the binaries in step 2 properly?  

---

### Answer by username_5 on 2022-08-09. Score: 0

Something definitely wrong. I can build `node` from scratch (with a clean cabal cache) in about an hour (on Linux x86\_64). Not sure how long this would take on an M1 Mac.

I also disagree with [/u/intrinsic-values](https://cardano.stackexchange.com/users/1894/intrinsic-values) on the Nix issue. IMO, Nix solves some problems that I do not have and creates a bunch of new problems.


---

