【问题标题】:Erlang installation issue: crypto failureErlang 安装问题:加密失败
【发布时间】:2015-11-03 17:14:22
【问题描述】:

这个问题与发布的其他 Erlang 加密失败问题不同,因为环境不是 Windows,openssl 和 libssl-dev 先决条件是以标准方式安装的。这个问题是在 Erlang 中从源头上确定的,而不是 Riak 问题,尽管它是相关的。

在 Ubuntu 14.04 LTS x64 上安装 Erlang 16B02 作为 Raik 2.1.1 的先决条件。

按照 riak 安装 erlang 指南下载并安装了 Erlang:http://docs.basho.com/riak/latest/ops/building/installing/erlang/

在 Erlang 之前安装的先决条件(包括 openssl 和 libssl-dev)。构建工作正常,erlang shell 可以正常打开。

Riak 下载正常,但 $ make rel 失败,错误如下:-

fatal: Not a git repository (or any of the parent directories): .git
Using rebar.config.lock file to fetch dependencies
./rebar -C rebar.config.lock get-deps
Uncaught error in rebar_core: 
{'EXIT',
  {undef,
      [{crypto,start,[],[]},
  {rebar,run_aux,2,
      [{file,"src/rebar.erl"},{line,212}]},
  {rebar,main,1,
      [{file,"src/rebar.erl"},{line,58}]},
  {escript,run,2,
      [{file,"escript.erl"},{line,747}]},
  {escript,start,1,
      [{file,"escript.erl"},{line,277}]},
  {init,start_it,1,[]},
      {init,start_em,1,[]}]}}
=ERROR REPORT==== 11-Aug-2015::14:42:28 ===
Loading of /usr/local/lib/erlang/lib/crypto-3.1/ebin/crypto.beam failed: badfile
make: *** [locked-deps] Error 1

在一些研究指出 erlang 加密是一个问题后,我在 erlang shell 中尝试了以下操作:

Eshell V5.10.3  (abort with ^G)
1> crypto:start().
** exception error: undefined function crypto:start/0
2> 
=ERROR REPORT==== 11-Aug-2015::14:48:14 ===
Loading of /usr/local/lib/erlang/lib/crypto-3.1/ebin/crypto.beam failed: badfile

在我看来,这指向我无法解决的 erlang 安装错误。任何建议都将不胜感激。

【问题讨论】:

  • 谢谢,但我确实查看了该帖子。虽然症状似乎相同,但我的 erlang 构建的 ssl 先决条件是在构建之前通过 apt-get 在标准位置安装的,我的实现不在 Windows 上(根据所引用的帖子)。

标签: erlang riak


【解决方案1】:

你没有说你在什么平台上或者你是如何构建 OTP 的,但我的猜测是 ./otp_build(或 ./configure)没有在预期的地方找到 OpenSSL,只是默默地忽略了它。

如果找不到,使用--with-ssl 标志应该会强制它失败,如果需要,您可以为开关添加显式路径。

Basho OTP 构建文档可能没有那么详细,但 OTP_R16B02_basho8 上的任何内容都应该在所有受支持的平台上正确构建(和运行)。

【讨论】:

  • 谢谢。我确实使用 ./otp_build autoconf 和 ./configure && make && sudo make install 构建了它。我会尝试 ssl force 并提供反馈。平台是在 Windows 上的 VirtualBox 下运行的 Ubuntu 14.04 LTS x64。
  • 在 Linux x86_64 上,我使用 ./otp_build setup -a --prefix /opt/basho/otp-16-b8-h0 --enable-64bit --with-ssl --without-odbc --disable-hipe 构建 R16B02_basho7/8/9 显然您需要根据您的设置设置 --prefix,但这会产生 GA 构建。
  • 谢谢你,这成功了,让 Erlang 正常工作。
猜你喜欢
  • 2020-03-27
  • 2017-07-30
  • 2021-07-15
  • 2014-08-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-03-07
  • 2021-06-21
相关资源
最近更新 更多