rebar:创建应用程序时错误退出:{crypto,start,[]}
我严格按照此处的说明进行操作。然后我运行指令来创建应用程序项目结构,并收到以下错误。
$ ./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}]}}
有什么想法我做错了吗?
I followed the instructions here, to the letter. I then ran the instruction to create an application project structure, and got the following error.
$ ./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}]}}
Any ideas what I'm doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
看起来你的 Erlang 是在没有 OpenSSL(加密模块)的情况下编译的。许多(大多数?)Erlang 应用程序都需要加密。你需要获得一个带有工作加密模块的 Erlang 版本,然后你就不应该遇到任何这样的问题。
It looks like your Erlang was compiled without OpenSSL (the crypto module). crypto is required for many (most?) Erlang applications. You'll need to get a version of Erlang with a working crypto module, and then you shouldn't have any problems like this.
对您的论点的澄清是有效的答案(添加作为答案,因为评论太短)。
可能是 Erlang 已正确编译,但 OpenSSL 库对 Erlang 不可见,因此无法启动加密服务器。我在 Solaris 10 上编译了 Erlang,它没有抱怨 OpenSSL 未安装。事实上,它编译了 crypto 并将其安装在:
/usr/local/lib/erlang/lib/crypto-2.2/
但 Rebar 仍然无法工作。很容易检查问题是否确实出在加密模块上。
打开 Erlang shell 并输入
crypto:start()
。我的系统上就发生过这种情况:如果 OpenSSL 安装在非标准位置,就像在 Solaris 10 上使用 OpenCSW 安装 OpenSSL 时的情况一样,通过将库路径添加到环境变量中很容易解决问题。例如,在 Solaris 10 上到 /etc/profile:
然后注销并登录或重新加载 bash 环境,例如如下所示:
结果:
A clarification to YOUR ARGUMENT IS VALID's answer (adding as an answer because the comment is too short).
It may be that Erlang was compiled properly but the OpenSSL libraries are not visible to Erlang, so the crypto server can't be started. I compiled Erlang on Solaris 10 and it didn't complain about OpenSSL not being installed. In fact, it compiled crypto and installed it in:
/usr/local/lib/erlang/lib/crypto-2.2/
But Rebar still wasn't working. It's easy to check if the problem is indeed with the crypto module.
Open Erlang shell and type
crypto:start()
. This was happening on my system:If OpenSSL is installed in a non-standard location, as it is the case when using OpenCSW to install OpenSSL on Solaris 10, it is easy to fix the problem by adding the library path to the environment variable. For example on Solaris 10 to /etc/profile:
Then log-out and log-in or re-load the bash environment, for example like this:
Result:
我建议使用预编译的 Erlang,它可以从 Erlang 解决方案中获得: https://www .erlang-solutions.com/downloads/download-erlang-otp
也有一个适用于 Windows 的版本。
I'd recommend using precompiled Erlang which is available from Erlang Solutions: https://www.erlang-solutions.com/downloads/download-erlang-otp
There's one for Windows too.
运行 make 命令时出现此错误:
erlang 详细信息是:
似乎加密不起作用,因为该命令给出“确定”或“异常错误”。
需要帮助。
Getting this error when running make command:
The erlang details are:
Seems like crypto not working, as the command gives "Ok" or "exception error".
Help needed.
感谢伊万的回答。但我似乎明白了这个问题:
编译 erlang 时,ubuntu 自动更新已关闭且未安装依赖项(例如 libssh-dev)。一旦打开自动更新,它就会编译并且 make 命令运行良好。
Thanks for the answer Ivan. But it seems I figured out the issue:
The ubuntu auto updates were turned off and the dependencies were not installed while compiling erlang (e.g. libssh-dev). Once the auto update was turned on it compiled and make command ran fine.