erlang 为什么relx不生成发布?

k3fezbri  于 2022-12-08  发布在  Erlang
关注(0)|答案(2)|浏览(181)

My relx configuration

{release,{socket,"0.1.0"}}.
{extend_start_script,true}.

My .app file

{application,socket,
         [{description,[]},
          {vsn,"1"},
          {registered,[]},
          {applications,[kernel,stdlib,cowboy]},
          {mod,{socket,[]}},
          {env,[{http_port,8080}]},
          {modules,[socket_app,socket_socket_handler,socket_sup]}]}.

After compiling the application using rebar I run relx from my terminal and the following is the output that I get
===> Starting relx build process ...
===> Resolving OTP Applications from directories:

/home/akshat/Desktop/socket/ebin

   /home/akshat/Desktop/socket/deps

  /usr/lib/erlang/lib

===> Missing beam file hipe <<"/usr/lib/erlang/lib/hipe-3.10.2/ebin/hipe.beam">>
===> Resolving available OTP Releases from directories:

/home/akshat/Desktop/socket/ebin

     /home/akshat/Desktop/socket/deps

     /usr/lib/erlang/lib

No releases have been specified in the system!
I don't understand this message from relx. Does it not create the release for me?
How do I install hipe?

Update

After doing a fresh install of erlang I no longer get hipe error message. But rebar still says no releases have been specified by the system.

wa7juj8i

wa7juj8i1#

我也遇到了同样的问题,直到我进入rebar3项目的根目录,运行rebar3 compilerebar3 release命令。它运行得很完美。

$ > ls
enter code here
chatx   rebar3
$ > cd chatx/
$ > rebar3 compile
    ===> Verifying dependencies...
    ===> Compiling chatx
$ > rebar3 release
    ===> Verifying dependencies...
    ===> Compiling chatx
    ===> Starting relx build process ...
    ===> Resolving OTP Applications from directories:

      /Users/studio/erlang/chatx/_build/default/lib
      /Users/studio/erlang/chatx/apps
      /Users/studio/kerl/20.2/lib

    ===> Resolved chatx-0.1.0
    ===> Dev mode enabled, release will be symlinked
    ===> release successfully created!
eni9jsuy

eni9jsuy2#

重新安装Erlang解决了第一个问题,即hipe错误信息。relx的意思是什么
系统未指定版本
我的理解是,由于我只有一个应用程序,所以不需要显式地指定它。

{release,{socket,"0.1.0"},[socket]}.
{extend_start_script,true}.

这是可行的,我现在在my_rel文件夹中有一个发布。

相关问题