我一般是rebar和erlang的初学者。我试图根据本教程创建一个带有 rebar 的 erlang 版本:http ://www.metabrew.com/article/erlang-rebar-tutorial-generating-releases-upgrades并在运行生成的版本时卡住了。
我的系统是 Ubuntu 11.04 64bit,erlang R14B03,从源代码安装。
当我调用“bin/somenode 控制台”时,出现以下错误之一:
Exec: /home/ghik/Inz/somerel/rel/somenode/erts-5.8.4/bin/erlexec -boot /home/ghik/Inz/somerel/rel/somenode/releases/1/somenode -mode embedded -config /home/ghik/Inz/somerel/rel/somenode/etc/app.config -args_file /home/ghik/Inz/somerel/rel/somenode/etc/vm.args -- console
Root: /home/ghik/Inz/somerel/rel/somenode
{"init terminating in do_boot",{'cannot load',hipe_amd64_encode,get_files}}
Crash dump was written to: erl_crash.dump
init terminating in do_boot ()
有趣的是,每次我运行它时,都会列出不同的原子而不是'hipe_amd64_encode',例如:'hipe_amd64_defuse','hipe_amd64_assemble'等。我猜erlang无法加载hipe,但我不知道为什么是试图首先加载它。该版本仅包含一个非常简单的应用程序,仅依赖于内核和 stdlib。
出于某种原因,rebar 会生成一个 .rel 文件,其中包含许多不必要的应用程序:
%% rel generated at {2011,9,6} {20,5,48}
{release,{"somenode","1"},
{erts,"5.8.4"},
[{kernel,"2.14.4"},
{stdlib,"1.17.4"},
{sasl,"2.1.9.4"},
{someapp,"1"},
{compiler,"4.7.4",load},
{crypto,"2.0.3",load},
{et,"1.4.3",load},
{gs,"1.5.13",load},
{hipe,"3.8",load},
{inets,"5.6",load},
{mnesia,"4.4.19",load},
{observer,"0.9.9",load},
{public_key,"0.12",load},
{runtime_tools,"1.8.5",load},
{ssl,"4.1.5",load},
{syntax_tools,"1.6.7.1",load},
{tools,"2.6.6.4",load},
{webtool,"0.8.8",load},
{wx,"0.98.10",load}]}.
为什么 rebar 在 .rel 文件中列出了这么多应用程序?和事件如果没问题,为什么不开始发布?