user4492: Attempting to build the cardano-node on Mac OS Big Sur while following the instructions found here: https://developers.cardano.org/docs/get-started/installing-cardano-node/#macos
When I hit the cabal build all step I'm given the following error:
[ 14 of 193] Compiling PlutusCore.Pretty.Readable ( plutus-core/src/PlutusCore/Pretty/Readable.hs, dist/build/PlutusCore/Pretty/Readable.o, dist/build/PlutusCore/Pretty/Readable.dyn_o )
<command line>: dlopen(/Users/sanfordleach/.cabal/store/ghc-8.10.4/lib/libHScrdn-crypt-clss-2.0.0-a62d56db-ghc8.10.4.dylib, 5): Symbol not found: _sodium_free
  Referenced from: /Users/sanfordleach/.cabal/store/ghc-8.10.4/lib/libHScrdn-crypt-clss-2.0.0-a62d56db-ghc8.10.4.dylib
  Expected in: flat namespace
 in /Users/sanfordleach/.cabal/store/ghc-8.10.4/lib/libHScrdn-crypt-clss-2.0.0-a62d56db-ghc8.10.4.dylib


Note: I have the environmental vars.  Not sure how to check that libsodium is installed correctly but I ran the steps in the instructions.
Please help? Thank you!
EDIT 1: I see the libsodium files in my /usr/local/lib so I believe it's installed correctly
EDIT 2: At this point I've already created a node on an Ubuntu instance and it's working fine... not sure if its an issue with Mac OS but I recommend doing the same if you run into this issue.

user1764: If libsodium.so file is missing from /usr/local/lib, the problem here is that libsodium is not correctly installed on your Mac OS X environment.

user6109: I was running into this problem on MacOS Monterey (M1 Pro) while building plutus-starter.
Just like OP, I seemed to have installed libsodium correctly as I had all the libs in my PATH. Then I stumbled upon this thread that solved it for me. What I needed was to add a cabal.project.local file in the root of my project with
package cardano-crypto-praos
  flags: -external-libsodium-vrf 

which I think makes the VRF not be bundled, and thus ignored as we can do without it anyway.
Also, before that, I rebuilt using libsodium-1.0.18-stable.tar.gz from https://download.libsodium.org/libsodium/releases/, which may also have helped.
Perhaps all of that is useful to someone!

4492: <p>Attempting to build the cardano-node on Mac OS Big Sur while following the instructions found here: <a href="https://developers.cardano.org/docs/get-started/installing-cardano-node/#macos" rel="noreferrer">https://developers.cardano.org/docs/get-started/installing-cardano-node/#macos</a></p>
<p>When I hit the <code>cabal build all</code> step I'm given the following error:</p>
<pre><code>[ 14 of 193] Compiling PlutusCore.Pretty.Readable ( plutus-core/src/PlutusCore/Pretty/Readable.hs, dist/build/PlutusCore/Pretty/Readable.o, dist/build/PlutusCore/Pretty/Readable.dyn_o )
&lt;command line&gt;: dlopen(/Users/sanfordleach/.cabal/store/ghc-8.10.4/lib/libHScrdn-crypt-clss-2.0.0-a62d56db-ghc8.10.4.dylib, 5): Symbol not found: _sodium_free
  Referenced from: /Users/sanfordleach/.cabal/store/ghc-8.10.4/lib/libHScrdn-crypt-clss-2.0.0-a62d56db-ghc8.10.4.dylib
  Expected in: flat namespace
 in /Users/sanfordleach/.cabal/store/ghc-8.10.4/lib/libHScrdn-crypt-clss-2.0.0-a62d56db-ghc8.10.4.dylib
</code></pre>
<p><a href="https://i.stack.imgur.com/0BYLx.png" rel="noreferrer"><img src="https://i.stack.imgur.com/0BYLx.png" alt="" /></a></p>
<p>Note: I have the environmental vars.  Not sure how to check that libsodium is installed correctly but I ran the steps in the instructions.</p>
<p>Please help? Thank you!</p>
<p>EDIT 1: I see the libsodium files in my <code>/usr/local/lib</code> so I believe it's installed correctly</p>
<p>EDIT 2: At this point I've already created a node on an Ubuntu instance and it's working fine... not sure if its an issue with Mac OS but I recommend doing the same if you run into this issue.</p>
 1764: <p>If libsodium.so file is missing from /usr/local/lib, the problem here is that libsodium is not correctly installed on your Mac OS X environment.</p>
 6109: <p>I was running into this problem on MacOS Monterey (M1 Pro) while building <a href="https://github.com/input-output-hk/plutus-starter" rel="nofollow noreferrer">plutus-starter</a>.</p>
<p>Just like OP, I seemed to have installed libsodium correctly as I had all the libs in my PATH. Then I stumbled upon this <a href="https://forum.cardano.org/t/trying-to-build-a-cardano-node-cli-arm64v8-docker-image/41370/6" rel="nofollow noreferrer">thread</a> that solved it for me. What I needed was to add a <code>cabal.project.local</code> file in the root of my project with</p>
<pre><code>package cardano-crypto-praos
  flags: -external-libsodium-vrf 
</code></pre>
<p>which I think makes the <a href="https://github.com/input-output-hk/cardano-base/blob/master/cardano-crypto-praos/cardano-crypto-praos.cabal#L42" rel="nofollow noreferrer">VRF not be bundled</a>, and thus ignored as we can do without it anyway.</p>
<p>Also, before that, I rebuilt using libsodium-1.0.18-stable.tar.gz from <a href="https://download.libsodium.org/libsodium/releases/" rel="nofollow noreferrer">https://download.libsodium.org/libsodium/releases/</a>, which may also have helped.</p>
<p>Perhaps all of that is useful to someone!</p>
