<p>Okay, so I tried to replicate your issue (I'm using nix+cabal), but my <code>cabal build</code> works fine (I got some warnings, but everything compiled). Thus, all I can suggest is that you reclone the repo and try again, I've outlined the steps below, but they can be found in the <a href="https://github.com/input-output-hk/plutus#iohk-binary-cache" rel="nofollow noreferrer">plutus</a> and <a href="https://github.com/input-output-hk/plutus-starter" rel="nofollow noreferrer">plutus-starter</a> repo:</p>
<p>Check your /etc/nix/nix.conf and ensure that you've followed the procedure to set up the binary cache, which it looks like you've already done. At the very least perhaps check to ensure that the /etc/nix/nix.conf matches the config found in the <a href="https://github.com/input-output-hk/plutus#iohk-binary-cache" rel="nofollow noreferrer">Plutus README</a>.</p>
<p>Clone the <a href="https://github.com/input-output-hk/plutus-starter" rel="nofollow noreferrer">plutus-starter</a> repo:</p>
<pre><code>git clone git@github.com:input-output-hk/plutus-starter.git
</code></pre>
<p>Change directory into it:</p>
<pre><code>cd plutus-starter
</code></pre>
<p>Run a <a href="https://nixos.org/" rel="nofollow noreferrer">Nix</a> Shell (pretty important, nix manages your environment, not just your cached packages):</p>
<pre><code>nix-shell
</code></pre>
<p>Update cabal:</p>
<pre><code>cabal update
</code></pre>
<p>Try again:</p>
<pre><code>cabal build
</code></pre>
<p>If you're still having issues, then it would seem to me that you'll have to manually change the version of <code>cardano-crypto-class</code> that you're using.</p>
<p>If you're still having issues, some more information may be helpful.</p>

CC BY-SA 4.0
2022-01-14T21:30:53.097Z
I didn't understand I needed to use nix.
I'm trying to use it now, but it's been building for 3 hours and I have no idea how much longer it's going to keep building. Is there a way to see progress? So far it's up to 17Gb
dspyz
CC BY-SA 4.0
2022-01-14T21:34:47.140Z
You've likely not set up the binary cache properly. This has been a massive issue recently, especially for people using M1 RISC chips from Apple. If you're using an intel based machine, the steps outlined in the [Plutus README](https://github.com/input-output-hk/plutus/blob/master/README.adoc#iohk-binary-cache) should work. If you're using an M1 machine, I suggest you take a look at [this guide](https://github.com/renzwo/cardano-plutus-apps-install-m1).
Dilworth
CC BY-SA 4.0
2022-01-14T21:40:31.680Z
I'm confused; should I build `Plutus Core` first?
dspyz
CC BY-SA 4.0
2022-01-14T21:52:14.763Z
I think ```plutus-core``` is included within the binary cache when you boot up a nix-shell from the root project of ```plutus-starter```, so when you run cabal build, it'll build much faster. Limited knowledge of nix, but I assume you're completely unfamiliar with it? Nix provides a way to manage environments, such that you can have different versions of dependencies for different projects on your local file-system (and it's easy to switch between them). It also provides an 'in-network' cache, so you can pull down heavy pre-built dependencies from a shared address, so it's important to set up.
Dilworth
CC BY-SA 4.0
2022-01-14T21:54:14.623Z
You're likely building a version of GHC, or perhaps some other heavy dependency that you otherwise wouldn't need to if the binary cache for Nix was set up properly. Perhaps do some reading on nix, such that you have a better understanding of what it actually does? Then things may become clearer.
Dilworth
CC BY-SA 4.0
2022-01-14T21:54:28.867Z
The instructions you linked me to are for building Plutus Core, not for building Plutus Starter. They say to edit a `/etc/nix/nix.conf` file, but I have no such file (I installed `nix` with `curl -L https://nixos.org/nix/install | sh`)
dspyz
CC BY-SA 4.0
2022-01-14T21:56:38.587Z
If you read through the README in plutus-starter, it references the README in plutus, specifically: "Set up your machine to build things with Nix, following the Plutus README (make sure to set up the binary cache!)." - that's why I have also linked the plutus repo.
Dilworth
CC BY-SA 4.0
2022-01-14T21:59:58.790Z
Okay, but I still can't find a `nix.conf` file anywhere (in either of the two locations mentioned). I'm on Ubuntu 20.04
dspyz
CC BY-SA 4.0
2022-01-14T22:04:19.257Z
Right, I do remember reading somewhere (but I can't remember where, unfortunately, so I can't reference it) that if you do not have a /etc/nix/nix.conf, then you should simply create the directory and place the file in there. Again, I'm no nix guru, but I've done a lot of reading on it in the last day or two, and from what I understand, It may only be included in the multi-user version of nix, which may be why you don't have it. The last thing I can suggest is simply crating it and following the nix binary cache guide in the plutus readme. Good luck.
Dilworth
CC BY-SA 4.0
2022-01-14T22:21:22.010Z
Oh, it's directly underneath the instructions in the 'setting up binary cache' section in the plutus git repo, silly me! See: "If you don’t have an /etc/nix/nix.conf or don’t want to edit it, you may add the nix.conf lines to ~/.config/nix/nix.conf instead. You must be a trusted user to do this." - and that is for non-NixOS machines, so perfectly fine for Ubuntu 20.04 LTS, I've built a plutus-node from source on 20.04 not too long ago, so you should be good if you follow the instructions.
Dilworth
CC BY-SA 4.0
2022-01-14T22:22:47.783Z
Yes I saw that,
But as I was saying, I don't have a `~/.config/nix/nix.conf` either
dspyz
CC BY-SA 4.0
2022-01-14T22:23:51.857Z
In any case, it finished building the slow way, so I guess I'm done for now
dspyz
CC BY-SA 4.0
2022-01-14T22:28:17.123Z
Great. However, I would still urge you to set up the binary cache. Lastly, see: https://stackoverflow.com/questions/63142127/where-is-nix-conf-located-when-installed-on-osx - I know it's for Mac, but it looks like the same issue, it does just say create the file. Regardless, I hope this helped & good luck working on projects in the future.
Dilworth
CC BY-SA 4.0
2022-01-14T21:01:16.313Z
2022-01-14T21:01:16.313Z
Dilworth
<p>Does this repo <a href="https://github.com/input-output-hk/plutus-starter" rel="nofollow noreferrer">https://github.com/input-output-hk/plutus-starter</a> not need updating check dates below:</p>
<p>...:~/plutus-starter$ cat cabal.project
index-state: 2022-02-22T20:47:03Z</p>
<p>packages: ./.</p>
<p>-- You never, ever, want this.
write-ghc-environment-files: never</p>
<p>-- Always build tests and benchmarks.
tests: true
benchmarks: true</p>
<p>-- Plutus apps revision from 2022-04-06
source-repository-package
type: git
location: <a href="https://github.com/input-output-hk/plutus-apps.git" rel="nofollow noreferrer">https://github.com/input-output-hk/plutus-apps.git</a>
tag: v0.1.0
subdir:
doc
freer-extras
playground-common
plutus-chain-index
plutus-chain-index-core
plutus-contract
plutus-example
plutus-contract-certification
plutus-ledger
plutus-ledger-constraints
plutus-pab
plutus-pab-executables
plutus-playground-server
plutus-script-utils
plutus-streaming
plutus-tx-constraints
plutus-use-cases
web-ghc</p>
<p>...</p>

CC BY-SA 4.0
2022-10-10T15:29:45.193Z
2022-10-10T15:29:45.193Z
WIMS-Cardano
<p>Having trouble building the starter-template: <a href="https://github.com/input-output-hk/plutus-starter" rel="nofollow noreferrer">https://github.com/input-output-hk/plutus-starter</a></p>
<pre><code>$ cabal build
Warning: Requested index-state 2021-08-14T00:00:00Z is newer than
'hackage.haskell.org'! Falling back to older state (2021-08-13T22:58:51Z).
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
</code></pre>

CC BY-SA 4.0
2022-01-14T20:02:09.590Z
Not too much information to go off. However, the warning is fairly explicit insofar as telling you what the problem is. Since the plutus-starter repo does suggest trying to run ```cabal update``` if you get issues resolving dependencies, I assume you have tried that?
Dilworth
<plutus-starter>
How do I build the Plutus starter template?
# How do I build the Plutus starter template?

(Asked by: username_0 on 2022-01-14)

Having trouble building the starter-template: https://github.com/input-output-hk/plutus-starter
$ cabal build
Warning: Requested index-state 2021-08-14T00:00:00Z is newer than
'hackage.haskell.org'! Falling back to older state (2021-08-13T22:58:51Z).
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

**Tags:** plutus-starter
> **Comments:**
> **username_1**: Not too much information to go off. However, the warning is fairly explicit insofar as telling you what the problem is. Since the plutus-starter repo does suggest trying to run ```cabal update``` if you get issues resolving dependencies, I assume you have tried that?  

---

## 2 answers

### Answer by username_1 on 2022-01-14. Score: 1 | Accepted answer

Okay, so I tried to replicate your issue (I'm using nix+cabal), but my cabal build works fine (I got some warnings, but everything compiled). Thus, all I can suggest is that you reclone the repo and try again, I've outlined the steps below, but they can be found in the plutus and plutus-starter repo:
Check your /etc/nix/nix.conf and ensure that you've followed the procedure to set up the binary cache, which it looks like you've already done. At the very least perhaps check to ensure that the /etc/nix/nix.conf matches the config found in the Plutus README.
Clone the plutus-starter repo:
git clone git@github.com:input-output-hk/plutus-starter.git

Change directory into it:
cd plutus-starter

Run a Nix Shell (pretty important, nix manages your environment, not just your cached packages):
nix-shell

Update cabal:
cabal update

Try again:
cabal build

If you're still having issues, then it would seem to me that you'll have to manually change the version of cardano-crypto-class that you're using.
If you're still having issues, some more information may be helpful.

> **Comments:**
> **username_0**: I didn't understand I needed to use nix. I'm trying to use it now, but it's been building for 3 hours and I have no idea how much longer it's going to keep building. Is there a way to see progress? So far it's up to 17Gb  
> **username_1**: You've likely not set up the binary cache properly. This has been a massive issue recently, especially for people using M1 RISC chips from Apple. If you're using an intel based machine, the steps outlined in the [Plutus README](https://github.com/input-output-hk/plutus/blob/master/README.adoc#iohk-binary-cache) should work. If you're using an M1 machine, I suggest you take a look at [this guide](https://github.com/renzwo/cardano-plutus-apps-install-m1).  
> **username_0**: I'm confused; should I build `Plutus Core` first?  
> **username_1**: I think ```plutus-core``` is included within the binary cache when you boot up a nix-shell from the root project of ```plutus-starter```, so when you run cabal build, it'll build much faster. Limited knowledge of nix, but I assume you're completely unfamiliar with it? Nix provides a way to manage environments, such that you can have different versions of dependencies for different projects on your local file-system (and it's easy to switch between them). It also provides an 'in-network' cache, so you can pull down heavy pre-built dependencies from a shared address, so it's important to set up.  
> **username_1**: You're likely building a version of GHC, or perhaps some other heavy dependency that you otherwise wouldn't need to if the binary cache for Nix was set up properly. Perhaps do some reading on nix, such that you have a better understanding of what it actually does? Then things may become clearer.  
> **username_0**: The instructions you linked me to are for building Plutus Core, not for building Plutus Starter. They say to edit a `/etc/nix/nix.conf` file, but I have no such file (I installed `nix` with `curl -L https://nixos.org/nix/install | sh`)  
> **username_1**: If you read through the README in plutus-starter, it references the README in plutus, specifically: "Set up your machine to build things with Nix, following the Plutus README (make sure to set up the binary cache!)." - that's why I have also linked the plutus repo.  
> **username_0**: Okay, but I still can't find a `nix.conf` file anywhere (in either of the two locations mentioned). I'm on Ubuntu 20.04  
> **username_1**: Right, I do remember reading somewhere (but I can't remember where, unfortunately, so I can't reference it) that if you do not have a /etc/nix/nix.conf, then you should simply create the directory and place the file in there. Again, I'm no nix guru, but I've done a lot of reading on it in the last day or two, and from what I understand, It may only be included in the multi-user version of nix, which may be why you don't have it. The last thing I can suggest is simply crating it and following the nix binary cache guide in the plutus readme. Good luck.  
> **username_1**: Oh, it's directly underneath the instructions in the 'setting up binary cache' section in the plutus git repo, silly me! See: "If you don’t have an /etc/nix/nix.conf or don’t want to edit it, you may add the nix.conf lines to ~/.config/nix/nix.conf instead. You must be a trusted user to do this." - and that is for non-NixOS machines, so perfectly fine for Ubuntu 20.04 LTS, I've built a plutus-node from source on 20.04 not too long ago, so you should be good if you follow the instructions.  
> **username_0**: Yes I saw that, But as I was saying, I don't have a `~/.config/nix/nix.conf` either  
> **username_0**: In any case, it finished building the slow way, so I guess I'm done for now  
> **username_1**: Great. However, I would still urge you to set up the binary cache. Lastly, see: https://stackoverflow.com/questions/63142127/where-is-nix-conf-located-when-installed-on-osx - I know it's for Mac, but it looks like the same issue, it does just say create the file. Regardless, I hope this helped & good luck working on projects in the future.  

---

### Answer by username_2 on 2022-10-10. Score: 0

Does this repo <https://github.com/input-output-hk/plutus-starter> not need updating check dates below:

...:~/plutus-starter$ cat cabal.project
index-state: 2022-02-22T20:47:03Z

packages: ./.

-- You never, ever, want this.
write-ghc-environment-files: never

-- Always build tests and benchmarks.
tests: true
benchmarks: true

-- Plutus apps revision from 2022-04-06
source-repository-package
type: git
location: <https://github.com/input-output-hk/plutus-apps.git>
tag: v0.1.0
subdir:
doc
freer-extras
playground-common
plutus-chain-index
plutus-chain-index-core
plutus-contract
plutus-example
plutus-contract-certification
plutus-ledger
plutus-ledger-constraints
plutus-pab
plutus-pab-executables
plutus-playground-server
plutus-script-utils
plutus-streaming
plutus-tx-constraints
plutus-use-cases
web-ghc

...


---

