Erlang安装问题:加密失败



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

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

Erlang已下载并安装,按照riak指南安装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安装,我无法解决。如有任何建议,我们将不胜感激。

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

使用--with-ssl标志应该强制它失败,如果它没有找到它,你可以添加一个显式的路径到交换机,如果你需要。

Basho OTP构建文档没有那么详细,但是从OTP_R16B02_basho8开始的任何东西都应该在所有支持的平台上正确构建(并运行)。

最新更新