<p>You are missing <code>libsodium</code> :</p>
<pre><code>[__0] rejecting: cardano-crypto-class-2.0.0 (conflict: pkg-config package
libsodium-any, not found in the pkg-config database)
</code></pre>
<p>The way I get around this is <code>sudo apt install libsodium-dev</code> and then create a top level file <code>cabal.project.local</code> containing:</p>
<pre><code>package cardano-crypto-praos
  flags: -external-libsodium-vrf
</code></pre>
<p>Pretty sure this is documented somewhere in the <code>cardano-node</code> repository.</p>

CC BY-SA 4.0
2023-02-02T18:02:12.957Z
It is documented here: https://github.com/input-output-hk/cardano-node/blob/1.35.5/doc/getting-started/install.md#installing-libsodium
james
CC BY-SA 4.0
2023-11-05T01:32:41.477Z
It is documented, but it no longer works. Builds are failing with the hack in place.
Andrej Podzimek
CC BY-SA 4.0
2023-11-05T19:57:19.610Z
I just tried it and it works for me. What *specifically* is the problem you are seeing. Probably worth asking that as a new question. You need to specify what steps you are taking and what the error is.
Erik de Castro Lopo
CC BY-SA 4.0
2023-02-02T06:38:42.930Z
2023-02-02T06:38:42.930Z
Erik de Castro Lopo
<p>I am getting the following error after trying to execute <code>cabal build</code>:</p>
<pre><code>cabal: Could not resolve dependencies:
[__0] next goal: cardano-crypto-class (user goal)
[__0] rejecting: cardano-crypto-class-2.0.0.0.1/installed-iw7NtuXmRKLDXiVT5sxh
(constraint from user target requires ==2.0.0)
[__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>
<p>I am using <code>cabal 3.6.2.0</code> and <code>ghc 8.10.7</code></p>

<plutus><haskell><cabal><development><ghc>
Error when trying to build my Plutus project
# Error when trying to build my Plutus project

(Asked by: username_0 on 2023-02-02)

I am getting the following error after trying to execute cabal build:
cabal: Could not resolve dependencies:
[__0] next goal: cardano-crypto-class (user goal)
[__0] rejecting: cardano-crypto-class-2.0.0.0.1/installed-iw7NtuXmRKLDXiVT5sxh
(constraint from user target requires ==2.0.0)
[__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

I am using cabal 3.6.2.0 and ghc 8.10.7

**Tags:** plutus, haskell, cabal, development, ghc

---

## 1 answers

### Answer by username_1 on 2023-02-02. Score: 2 | Accepted answer

You are missing libsodium :
[__0] rejecting: cardano-crypto-class-2.0.0 (conflict: pkg-config package
libsodium-any, not found in the pkg-config database)

The way I get around this is sudo apt install libsodium-dev and then create a top level file cabal.project.local containing:
package cardano-crypto-praos
  flags: -external-libsodium-vrf

Pretty sure this is documented somewhere in the cardano-node repository.

> **Comments:**
> **username_2**: It is documented here: https://github.com/input-output-hk/cardano-node/blob/1.35.5/doc/getting-started/install.md#installing-libsodium  
> **username_3**: It is documented, but it no longer works. Builds are failing with the hack in place.  
> **username_1**: I just tried it and it works for me. What *specifically* is the problem you are seeing. Probably worth asking that as a new question. You need to specify what steps you are taking and what the error is.  

---

