我很熟悉用钢筋构建erlang版本。现在我正在试用relx的打包版本。
我用erlang.mk构建代码。我有一个relx.config,它列出了我想打包的应用程序。命令
./relx -o rel/myrel成功吧。
但是,启动发行版失败并崩溃:
cd rel
./myrel/bin/myrel console
Exec: /Users/ivan/tmp/rel/myrel/erts-5.9.2/bin/erlexec -boot /Users/ivan/tmp/rel/myrel/releases/1.0.0/myrel -env ERL_LIBS /Users/ivan/tmp/rel/myrel/releases/1.0.0/lib -config /Users/ivan/tmp/rel/myrel/releases/1.0.0/sys.config -args_file /Users/ivan/tmp/rel/myrel/releases/1.0.0/vm.args -- console
Root: /Users/ivan/tmp/rel/myrel
{error_logger,{{2014,2,4},{11,43,6}},supervisor_report,[{supervisor,{local,kernel_sup}},{errorContext,start_error},{reason,{'EXIT',{undef,[{prim_inet,open,[udp,inet],[]},{inet,open,7,[]},{inet_config,set_hostname,0,[]},{inet_config,init,0,[]},{inet_db,start_link,0,[]},{supervisor,do_start_child,2,[]},{supervisor,start_children,3,[]},{supervisor,init_children,2,[]}]}}},{offender,[{pid,undefined},{name,inet_db},{mfargs,{inet_db,start_link,[]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
{error_logger,{{2014,2,4},{11,43,6}},std_info,[{application,kernel},{exited,{shutdown,{kernel,start,[normal,[]]}}},{type,permanent}]}
{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}}"}
Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller) ({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}})看起来这个版本找不到prim_inet:open/2 --要么是因为它的包含应用程序还没有启动,要么是因为它没有正确的路径。
我尝试过在relx.config中列出inets (和其他应用程序)。没有效果。
从relx日志中,它似乎了解我的erlang库(在/usr/local/lib/erlang/lib中)。
有人能帮我找出我缺少的东西,以及我如何使上面的发行版有效吗?
更新:没有创建上面的ERL_LIBS目录。同时,我指定的应用程序都是myrel/lib/。所以很明显有什么事情发生了。
带着感谢和最美好的祝愿
伊万
发布于 2014-02-04 16:11:52
我在R15B03上也有同样的问题,RELX0.6.0
我注意到prim_inet放在/path/to/erlang/lib/erts-[vsn]中(它没有应用程序资源文件,因此不能指定为依赖项),但是relx包含/path/to/erlang/erts-[vsn]。
似乎是一个错误,我们应该报告它的relx问题跟踪器。
https://stackoverflow.com/questions/21552355
复制相似问题