** (UndefinedFunctionError) function :crypto.strong_rand_bytes/1 is undefined (module :crypto is not available)
When running sudo -u pleroma /usr/local/pleroma/bin/pleroma_ctl instance gen
, I get:
What is the hostname of your database? [localhost]
What is the name of your database? [pleroma]
What is the user used to connect to your database? [pleroma]
** (UndefinedFunctionError) function :crypto.strong_rand_bytes/1 is undefined (module :crypto is not available)
:crypto.strong_rand_bytes(64)
(pleroma 2.4.3) lib/mix/tasks/pleroma/instance.ex:118: Mix.Tasks.Pleroma.Instance.run/1
(stdlib 3.12.1.2) erl_eval.erl:680: :erl_eval.do_apply/6
(elixir 1.10.4) lib/code.ex:341: Code.eval_string_with_error_handling/3
Pleroma installed from release https://git.pleroma.social/api/v4/projects/2/jobs/artifacts/stable/download?job=arm-musl to /tmp/pleroma.zip
. (Cannot get a more detailed version, pleroma_ctl
does not seem able to display a version.)
% elixir -v
Erlang/OTP 25 [erts-13.0.3] [source] [32-bit] [smp:2:2] [ds:2:2:10] [async-threads:1]
Elixir 1.14.0 (compiled with Erlang/OTP 25)
Running on Alpine Linux:
% cat /etc/alpine-release
3.17_alpha20220809
% openssl version
OpenSSL 3.0.5 5 Jul 2022 (Library: OpenSSL 3.0.5 5 Jul 2022)
% psql -V
psql (PostgreSQL) 14.5
(probably irrelevant)
I'm aware of the various bugs producing a similar error message when there is a wrong version of OpenSSL compiled in (for instance #1124 (closed)). But, here, Elixir seems fine:
% iex
Erlang/OTP 25 [erts-13.0.3] [source] [32-bit] [smp:2:2] [ds:2:2:10] [async-threads:1]
Interactive Elixir (1.14.0) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> :crypto.strong_rand_bytes(10)
<<84, 17, 126, 227, 194, 96, 241, 26, 149, 174>>
Is it possible that the Pleroma release was compiled with an old version of OpenSSL? And therefore I have to compile from sources?
Edited by Stéphane Bortzmeyer