sodium.h needed

Sam S's Avatar

Sam S

13 Apr, 2017 03:54 AM

Building target: mpw...
core/mpw-util.c:33:20: fatal error: sodium.h: No such file or directory
 #include "sodium.h"
compilation terminated.

How do I fix this?

  1. Support Staff 1 Posted by Maarten Billemo... on 13 Apr, 2017 04:09 AM

    Maarten Billemont's Avatar

    Is the problem resolved by modifying core/mpw-util.c and changing

     #include "sodium.h"


     #include <sodium.h>
  2. 2 Posted by Sam S on 13 Apr, 2017 04:55 AM

    Sam S's Avatar

    I did sudo gedit on the file and saved it, but the same build-error occurs.

  3. 3 Posted by Sam S on 13 Apr, 2017 10:11 PM

    Sam S's Avatar

    Was the sodium header file left out of the source package by accident?

  4. Support Staff 4 Posted by Maarten Billemo... on 13 Apr, 2017 10:13 PM

    Maarten Billemont's Avatar

    No, it is part of libsodium. Do you have libsodium installed?

  5. 5 Posted by Sam S on 14 Apr, 2017 06:36 AM

    Sam S's Avatar

    I don't have libsodium and just assumed that it was part of the "build". Found the problem?

    I read that libssl-dev is a substitute for openssl-dev. ? Also, where do I get ncurses-dev?

  6. Support Staff 6 Posted by Maarten Billemo... on 14 Apr, 2017 12:49 PM

    Maarten Billemont's Avatar

    It all depends on your operating system / distribution. These are questions for them, I can't really help with it.

    It's slightly peculiar, because ./build should have detected you don't have libsodium and downloaded & linked against Tarsnap's scrypt instead.

    openssl is only required if you don't use libsodium ( see updated build instructions here: ).

    Can you run this in your shell and give me the output?

    gcc -lsodium
  7. 7 Posted by Sam S on 14 Apr, 2017 08:56 PM

    Sam S's Avatar

    ~ $ gcc -lsodium
    /usr/bin/ld: cannot find -lsodium

    Mint 17.
    I don't see libsodium in the repository or Synaptic pkg manager.

  8. Support Staff 8 Posted by Maarten Billemo... on 14 Apr, 2017 09:02 PM

    Maarten Billemont's Avatar

    OK. You can either pull the latest changes from the repo and try again or install libsodium with your distribution's package manager. If you don't install libsodium, the build process should download scrypt for you after pulling the latest changes.

    I still recommend you use libsodium, though.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

21 Oct, 2018 08:02 PM
20 Oct, 2018 06:47 PM
16 Oct, 2018 11:17 PM
13 Oct, 2018 10:24 AM
10 Oct, 2018 11:48 PM


09 Oct, 2018 01:17 PM
07 Oct, 2018 05:48 PM
05 Oct, 2018 09:22 AM
02 Oct, 2018 10:22 AM
01 Oct, 2018 10:37 AM
30 Sep, 2018 01:07 PM