安装rebar时提示"Uncaught error in rebar_core"

按照教程安装rebar,从 https://github.com/rebar/rebar/ 下载编译好的版本(注:网上大多数都是说的http://github.com/rebar/rebar/wiki/rebar这个地址,但是这个地址找不到,应该是已经更新了),或者直接下载源码包到本地,然后自己编译:

git clone git://github.com/rebar/rebar.git
cd rebar
./bootstrap

安装成功会提示(https://github.com/rebar/rebar):

Recompile: src/getopt
...
Recompile: src/rebar_utils
==> rebar (compile)
Congratulations! You now have a self-contained script called "rebar" in
your current working directory. Place this script anywhere in your path
and you can use rebar to build OTP-compliant apps.

我的却提示:

Recompile: src/getopt
...
Recompile: src/rebar_xref
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}]},
                                 {erl_eval,do_apply,6,
                                  [{file,"erl_eval.erl"},{line,657}]},
                                 {escript,eval_exprs,5,
                                  [{file,"escript.erl"},{line,865}]},
                                 {erl_eval,local_func,5,
                                  [{file,"erl_eval.erl"},{line,544}]},
                                 {escript,interpret,4,
                                  [{file,"escript.erl"},{line,781}]},
                                 {escript,start,1,
                                  [{file,"escript.erl"},{line,276}]}]}}

随后就是各种查资料,最后弄明白了,其实不是rebar的问题,从报错可以看出在编译crypto模块时候出现了undef错误,也就是说crypto模块不存在,这个模块其实是安装erlang的时候生成的,也就是说问题出在erlang 上;

rebar的github(https://github.com/yrashk/socket.io-erlang)说明里也提到了这个问题如下:

安装rebar时提示"Uncaught error in rebar_core"

其实这是因为erlang在安装的时候没有安装openssl,erlang安装的时候需要依赖几个库,其中就有openssl,可以参考这篇文章, 但是我安装openssl时候却提示已安装,之后我查到源码包安装erlang时,config要带一些参数,我发现我的openssl路径和网上提到的 都不一样,所以我就在--withssl="path"里把自己的openssl路径填上重新安装了一次erlang之后问题就解决了,

问题解决之前:

安装rebar时提示"Uncaught error in rebar_core"

解决之后:

安装rebar时提示"Uncaught error in rebar_core"

如果这样还解决不了问题可以参考下面的帖子:

erlang加载openssl失败

erlang crypto模块不兼容openssl

源码安装erlang
Uncaught error in rebar_core

另加一篇安装erlang的文章:

http://my.codeweblog.com/u/1540325/blog/308984

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值