当未安装Erlang时,找不到Erlang的public_key。

huangapple go评论57阅读模式
英文:

Erlang's public_key not found when Erlang is not installed

问题

我正在使用Phoenix制作“hello world”。但在创建数据库时,mint依赖项无法编译。

mix ecto.create要求我安装rebar3来构建:telemetry,然后:

==> mint Compiling 1 file (.erl) src/mint_shims.erl:37:14: 找不到包含库“public_key/include/public_key.hrl” % 37| -include_lib("public_key/include/public_key.hrl"). % | ^

我已经安装了asdf、hex和:

$ 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 (使用 Erlang/OTP 24 编译)

但在我的系统上找不到该名称的可找到文件:

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
我错过了什么?

英文:

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 ?

答案1

得分: 2

你是否正在使用Ubuntu?看起来你需要安装erlang-public-key软件包。

我已经安装了asdf

这个错误意味着你没有使用asdf来构建erlang,而是依赖于你的操作系统提供的版本。

英文:

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.

答案2

得分: 1

感谢smathy,我意识到在执行elixir --version命令的结果中,一些提及错误地让我以为erlang已经安装了。例如,我的错误通过以下命令得到修复:

sudo apt-get purge ca-certificates-java

这样我就可以正常安装erlang了:

sudo apt-get install erlang
英文:

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

huangapple
  • 本文由 发表于 2023年8月9日 06:05:00
  • 转载请务必保留本文链接:https://go.coder-hub.com/76863465.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定