Erlang's public_key not found when Erlang is not installed

297 views Asked by At

I am making the "hello world" in phoenix . But at the moment of creating the database the mint dependency cannot compile

mix ecto.create asked me to install rebar3 to build :telemetry and then :

==> mint Compiling 1 file (.erl) src/mint_shims.erl:37:14: can't find include lib "public_key/include/public_key.hrl" % 37| -include_lib("public_key/include/public_key.hrl"). % | ^

I've installed asdf, hex and also :

$ elixir --version
Erlang/OTP 25 [erts-13.1.5] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit:ns]

Elixir 1.14.0 (compiled with Erlang/OTP 24)

But on my system no findable file with that name :

locate public_key /usr/src/linux-headers-6.1.0-10-common/include/crypto/public_key.h /usr/src/linux-headers-6.1.0-7-common/include/crypto/public_key.h /usr/src/linux-headers-6.1.0-9-common/include/crypto/public_key.h What am i missing on do not know ?

2

There are 2 answers

0
plombix On BEST ANSWER

Thanks to smathy i realized that some mentions in the result of

elixir --version

wrongly induce me to think that erlang was instaled for instance my error was fixed by :

sudo apt-get purge ca-certificates-java 

which let me install erlang normaly with :

sudo apt-get install erlang
2
Adam Millerchip On

Are you using Ubuntu? Looks like you need to install the erlang-public-key package.

I've installed asdf

The error implies that you are not using asdf to build erlang, but are relying on your OS's packaged version.