Erlang用Rebar部署,篡改错误{“init终止do_boot”,{'can not load',hipe,get_file}} [英] Erlang deploying with Rebar, hipe error {"init terminating in do_boot",{'cannot load',hipe,get_file}}

查看:862
本文介绍了Erlang用Rebar部署,篡改错误{“init终止do_boot”,{'can not load',hipe,get_file}}的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 根:/ home / jwong / erlang_examples / mysample / rel / mysample 
{init终止do_boot,{'can not load',hipe,get_file}}

崩溃转储已写入:erl_crash.dump
init终止于do_boot()

erl -init_debug

  {progress,preloaded} 
{progress,kernel_load_completed}
{progress,modules_loaded}
{start,heart}
{start,error_logger}
{start,application_con troller}
{progress,init_kernel_started}
{apply,{application,load,[{application,stdlib,[{description,ERTS CXC 138 10},{vsn,1.18.2} ,{ID,[]},{模块,[阵列,BASE64,beam_lib,二进制,C,日历,dets的,dets_server,dets_sup,dets_utils,dets_v8,dets_v9,字典,有向图,digraph_utils,EDLIN,edlin_expand,EPP,eval_bits, erl_bits,erl_compile,erl_eval,erl_expand_records,erl_internal,erl_lint,erl_parse,erl_posix_msg,erl_pp,erl_scan,erl_tar,error_logger_file_h,error_logger_tty_h,escript,ETS,file_sorter,FileLib文件,文件名,gb_trees,gb_sets,根,gen_event,的gen_fsm,gen_server,IO, io_lib,io_lib_format,io_lib_fread,io_lib_pretty,LIB,列表,log_mf_h,数学,ms_transform,orddict,ordsets,otp_internal,PG,游泳池,proc_lib,proplists,QLC,qlc_pt,队列,随机,重复,套,外壳,shell_default,奴隶,的SOF,串,主管supervisor_bridge,SYS,定时器,unicode的,win32reg,拉链]},{注册,[timer_server,rsh_starter,take_over_monitor,pool_master,dets的]},{应用,[内核]},{included_applications,[]} {ENV,[]},{MAXT,无限},{MAXP,在finity}]}}}
{progress,applications_loaded}
{apply,{application,start_boot,[kernel,permanent]}}
Erlang R15B02(erts-5.9.2)[source ] [64位] [smp:4:4] [async-threads:0] [kernel-poll:false]

{apply,{application,start_boot,[stdlib,permanent]}}
{apply,{c,erlangrc,[]}}
{progress,started}
Eshell V5.9.2(中止与^ G)

我正在运行ubuntu 12.04,使用没有标志选项的kerl编译的erlang。对生成的reltool.config所做的唯一修改是将../../添加到lib_dirs。



它看起来非常相似[这个问题] [ 1],但对reltool.config添加hipe导致错误:

  {'EXIT',{{badmatch, {错误,非法选项:[{app,mysample,hipe,[{mod_cond,app},{incl_cond,include}]}]}} 

发生了什么,我该如何解决?

解决方案

原来是链接的问题的完全重复/ p>

问题是我在reltool.config中错误的地方添加了这个行。



钢筋生成:

  app,mysample,[{mod_cond,app},{incl_cond,include}]} 

自动配置。而不是使用hipe编辑行,或将其添加到文件的底部,正确的配置是将其添加到sys数组中,生成的应用程序下面,使其看起来像:

  {app,mysample,[{mod_cond,app},{incl_cond,include}]},
{app,hipe,[{incl_cond ,exclude}]}


Very new to Erlang, and any attempt to run a simple hello world program using the rebar results in the following error:

./rel/mysample/bin/mysample console
Exec: /home/jwong/erlang_examples/mysample/rel/mysample/erts-5.9.2/bin/erlexec -boot   /home/jwong/erlang_examples/mysample/rel/mysample/releases/1/mysample -mode embedded -config   /home/jwong/erlang_examples/mysample/rel/mysample/releases/1/sys.config -args_file    /home/jwong/erlang_examples/mysample/rel/mysample/releases/1/vm.args -- console
Root: /home/jwong/erlang_examples/mysample/rel/mysample
{"init terminating in do_boot",{'cannot load',hipe,get_file}}

Crash dump was written to: erl_crash.dump
init terminating in do_boot ()

erl -init_debug

{progress,preloaded}
{progress,kernel_load_completed}
{progress,modules_loaded}
{start,heart}
{start,error_logger}
{start,application_controller}
{progress,init_kernel_started}
{apply,{application,load,[{application,stdlib,[{description,"ERTS  CXC 138 10"},{vsn,"1.18.2"},{id,[]},{modules,[array,base64,beam_lib,binary,c,calendar,dets,dets_server,dets_sup,dets_utils,dets_v8,dets_v9,dict,digraph,digraph_utils,edlin,edlin_expand,epp,eval_bits,erl_bits,erl_compile,erl_eval,erl_expand_records,erl_internal,erl_lint,erl_parse,erl_posix_msg,erl_pp,erl_scan,erl_tar,error_logger_file_h,error_logger_tty_h,escript,ets,file_sorter,filelib,filename,gb_trees,gb_sets,gen,gen_event,gen_fsm,gen_server,io,io_lib,io_lib_format,io_lib_fread,io_lib_pretty,lib,lists,log_mf_h,math,ms_transform,orddict,ordsets,otp_internal,pg,pool,proc_lib,proplists,qlc,qlc_pt,queue,random,re,sets,shell,shell_default,slave,sofs,string,supervisor,supervisor_bridge,sys,timer,unicode,win32reg,zip]},{registered,[timer_server,rsh_starter,take_over_monitor,pool_master,dets]},{applications,[kernel]},{included_applications,[]},{env,[]},{maxT,infinity},{maxP,infinity}]}]}}
{progress,applications_loaded}
{apply,{application,start_boot,[kernel,permanent]}}
Erlang R15B02 (erts-5.9.2) [source] [64-bit] [smp:4:4] [async-threads:0] [kernel-poll:false]

{apply,{application,start_boot,[stdlib,permanent]}}
{apply,{c,erlangrc,[]}}
{progress,started}
Eshell V5.9.2  (abort with ^G)

I am running ubuntu 12.04, using erlang compiled using kerl with no flag options. The only modifications I have made to the generated reltool.config is adding "../../" to the lib_dirs.

It looks very similar [this question][1] but adding "hipe" to the reltool.config resulted in an error:

{'EXIT',{{badmatch,{error,"Illegal option: [{app,mysample,hipe,[{mod_cond,app},{incl_cond,include}]}]"}}

What is going on, and how can I resolve this?

解决方案

This turned out to be an exact duplicate of the linked question

The issue was that I was adding the line in the wrong area in the reltool.config.

rebar generates:

app, mysample, [{mod_cond, app}, {incl_cond, include}]}

within the configuration automatically. Rather than edit the line with "hipe", or add it at the bottom of the file, the correct configuration was to do add it within the sys array, underneath the generated app, so that it looks like:

{app, mysample, [{mod_cond, app}, {incl_cond, include}]},
{app, hipe, [{incl_cond, exclude}]}

这篇关于Erlang用Rebar部署,篡改错误{“init终止do_boot”,{'can not load',hipe,get_file}}的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆