DllNotFoundException on alpine 3.9.4
Closed this issue · 3 comments
iokill commented
Hi!
I'm using Sodium.Core within an alpine linux container with dotnet 2.1. With the current 1.2.1 release, this pulls in libsodium 1.0.17.1 and fails with:
System.TypeInitializationException : The type initializer for 'Sodium.SodiumCore' threw an exception.
---- System.DllNotFoundException : Unable to load shared library 'libsodium' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: Error loading shared library liblibsodium: No such file or directory
Stack Trace:
at Sodium.SodiumCore.Init()
at Sodium.PasswordHash.ArgonHashBinary(Byte[] password, Byte[] salt, Int64 opsLimit, Int32 memLimit, Int64 outputLength, ArgonAlgorithm alg)
at UnitTests.Utilities.Security.Passwords.Argon2Tests.TestArgon2idCorrectness() in /code/UtilitiesTests/Security/Passwords/Argon2Tests.cs:line 38
----- Inner Stack Trace -----
at Sodium.SodiumLibrary.sodium_init()
at Sodium.SodiumCore.Init()
at Sodium.SodiumCore..cctor()
If I manually add the latest libsodium dependency for 1.0.18 it works fine. So I assume, that this is an issue with libsodium 1.0.17.1 not working on alpine? Is it possible to update the dependency to 1.0.18?
Thanks!
tabrath commented
Yes, it was recently released to nuget (long awaited), so I’ll upgrade it asap! Thanks for the feedback.
iokill commented
Works perfectly now, thanks!