Silent-Wraith01

Silent-Wraith01

Getting error: Unable to load crypto library.. OpenSSL might not be installed on this system

dev@dev:\~/discuss$ iex -S mix phx.server
Erlang/OTP 25 \[erts-13.1.5\] \[source\] \[64-bit\] \[smp:16:2\] \[ds:16:2:10\] \[async-threads:1\] \[jit:ns\]

\[error\] Unable to load crypto library. Failed with error:
“:load_failed, Failed to load NIF library /home/dev/.asdf/installs/erlang/25.2.3/lib/crypto-5.1.2/priv/lib/crypto: ‘libcrypto.so.1.1: cannot open shared object file: No such file or directory’”
OpenSSL might not be installed on this system.

\[warning\] The on_load function for module crypto returned:
{:error,
{:load_failed,
‘Failed to load NIF library /home/dev/.asdf/installs/erlang/25.2.3/lib/crypto-5.1.2/priv/lib/crypto: 'libcrypto.so.1.1: cannot open shared object file: No such file or directory'’}}

\[notice\] Application plug exited: Plug.Application.start(:normal, [ ]) returned an error: shutdown: failed to start child: Plug.Upload
\*\* (EXIT) an exception was raised:
\*\* (UndefinedFunctionError) function :crypto.strong_rand_bytes/1 is undefined (module :crypto is not available)
(crypto 5.1.2) :crypto.strong_rand_bytes(3)
(plug 1.16.1) lib/plug/upload.ex:210: Plug.Upload.init/1
(stdlib 4.2) gen_server.erl:851: :gen_server.init_it/2
(stdlib 4.2) gen_server.erl:814: :gen_server.init_it/6
(stdlib 4.2) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
\[notice\] Application telemetry exited: :stopped
\[notice\] Application plug_crypto exited: :stopped
\[notice\] Application mime exited: :stopped
\[notice\] Application eex exited: :stopped
\[notice\] Application runtime_tools exited: :stopped
\*\* (Mix) Could not start application plug: Plug.Application.start(:normal, [ ]) returned an error: shutdown: failed to start child: Plug.Upload
\*\* (EXIT) an exception was raised:
\*\* (UndefinedFunctionError) function :crypto.strong_rand_bytes/1 is undefined (module :crypto is not available)
(crypto 5.1.2) :crypto.strong_rand_bytes(3)
(plug 1.16.1) lib/plug/upload.ex:210: Plug.Upload.init/1
(stdlib 4.2) gen_server.erl:851: :gen_server.init_it/2
(stdlib 4.2) gen_server.erl:814: :gen_server.init_it/6
(stdlib 4.2) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
dev@dev:\~/discuss$

Most Liked

NobbZ

NobbZ

Wait, I have read the original error again. It is asking for version 1.1 of the library. That has been deprecated many years ago and hasn’t been shipped in Ubuntu since 22.04.

I also have realized, that you are using OTP 25.2. The prebuilt versions might indeed still link to that old version. If you are lucky a very recent 25.3.2.21 might link the correct libcrypto by default, as it is a quite recent release.

If not you might have to force a sourcebuild or try even OTP 26 or newer.

I haven’t used ASDF in ages, so I do not remember how to enforce an erlang build from source.

NobbZ

NobbZ

With “your Linux Distributions manual” I meant whatever ressources you can find through the Internet.

Though for Ubuntu its very likey apt install openssl, maybe openssl-dev

NobbZ

NobbZ

You have to install libcrypto, usually part of OpenSSL.

Details on how to do that should be described in your Linux Distributions manual.

Where Next?

Popular in Questions Top

sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
mgjohns61585
Could someone help me? I’m making my first elixir program, number guessing game. I can’t figure out how to convert the user’s guess from ...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
dotdotdotPaul
Okay, I’m having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I’m sure I’...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New

Other popular topics Top

siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39467 209
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement