我遵循说明 这里, ,写信。然后,我运行了指令来创建应用程序项目结构,并收到以下错误。

$ ./rebar create-app appid=myapp
Uncaught error in rebar_core: {'EXIT',
                              {undef,
                                  [{crypto,start,[]},
                                   {rebar_core,run,1},
                                   {rebar,main,1},
                                   {escript,run,2},
                                   {escript,start,1},
                                   {init,start_it,1},
                                   {init,start_em,1}]}}

有什么想法我做错了什么?

有帮助吗?

解决方案

看起来您的Erlang是没有OpenSSL(加密模块)的。许多(大多数?)Erlang应用程序需要加密。您需要使用带有工作加密模块的Erlang版本,然后您不应该遇到这样的问题。

其他提示

对您的论点的澄清是有效的答案(由于评论太短而添加为答案)。

可能是Erlang正确地编译了,但是Erlang看不到OpenSSL库,因此无法启动加密服务器。我在Solaris 10上编译了Erlang,但没有抱怨未安装OpenSSL。实际上,它编译了加密货币并将其安装在: /usr/local/lib/erlang/lib/crypto-2.2/

但是钢筋仍然没有工作。很容易检查加密模块是否确实存在问题。

打开Erlang外壳和类型 crypto:start(). 。这在我的系统上发生了:

bash-3.2# erl
Erlang R15B03 (erts-5.9.3.1) [source] [smp:2:2] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.9.3.1  (abort with ^G)
1> crypto:start().
** exception error: undefined function crypto:start/0
2>
=ERROR REPORT==== 8-Feb-2013::15:28:43 ===
Unable to load crypto library. Failed with error:
"load_failed, Failed to load NIF library: 'ld.so.1: beam.smp: fatal: relocation error: file /usr/local/lib/erlang/lib/crypto-2.2/priv/lib/crypto.so: symbol DES_ede3_cfb_encrypt: referenced symbol not found'"
OpenSSL might not be installed on this system.

=ERROR REPORT==== 8-Feb-2013::15:28:43 ===
The on_load function for module crypto returned {error,
                                                 {load_failed,
                                                  "Failed to load NIF library: 'ld.so.1: beam.smp: fatal: relocation error: file /usr/local/lib/erlang/lib/crypto-2.2/priv/lib/crypto.so: symbol DES_ede3_cfb_encrypt: referenced symbol not found'"}}

如果将OpenSSL安装在非标准位置中,那么在Solaris 10上安装OpenSSL时,就是这种情况,很容易通过将库路径添加到环境变量中来解决问题。例如,在Solaris 10到 /etc /profile:

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/csw/lib
export LD_LIBRARY_PATH

然后登录并登录或重载BASH环境,例如这样:

bash-3.2# . /etc/profile

结果:

bash-3.2# erl
Erlang R15B03 (erts-5.9.3.1) [source] [smp:2:2] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.9.3.1  (abort with ^G)
1> crypto:start().
ok

我建议使用Erlang Solutions可用的预编译Erlang: https://www.erlang-solutions.com/downloads/download-erlang-otp

Windows也有一个。

运行make命令时遇到此错误:

root@hs:/var/www/html/ejabberd-master# make
rm -rf deps/.got
rm -rf deps/.built
/usr/local/lib/erlang/bin/escript rebar get-deps && :> deps/.got
Uncaught error in rebar_core: {'EXIT',
                           {undef,
                            [{crypto,start,[],[]},
                             {rebar,run_aux,2,
                              [{file,"src/rebar.erl"},{line,163}]},
                             {rebar,main,1,
                              [{file,"src/rebar.erl"},{line,58}]},
                             {escript,run,2,
                              [{file,"escript.erl"},{line,757}]},
                             {escript,start,1,
                              [{file,"escript.erl"},{line,277}]},
                             {init,start_it,1,[]},
                             {init,start_em,1,[]}]}}
make: *** [deps/.got] Error 1

Erlang细节是:

root@hs:/home/node# erl
Erlang/OTP 18 [erts-7.0] [source] [64-bit] [smp:4:4] [async-    threads:10] [hipe] [kernel-poll:false]

Eshell V7.0  (abort with ^G)
1> crypto:start()
1> 

似乎是加密货币不起作用,因为命令给出了“确定”或“异常错误”。

需要帮助。

感谢您的回答。但是我看来我弄清楚了这个问题:Ubuntu自动更新已关闭,并且在编译Erlang(例如Libssh-dev)时未安装依赖项。自动更新打开后,将其编译并使命令运行正常。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top