erlang 在芝加哥老板失败的脚本:异常错误:未定义函数rebar:main/1

n53p2ov0  于 2022-12-16  发布在  Erlang
关注(0)|答案(1)|浏览(140)

我正在尝试根据here指令安装ChicagoBoss。现在,Make失败,出现异常-

=ERROR REPORT==== 14-Dec-2022::11:15:33.605319 ===
beam/beam_load.c(148): Error loading module rebar:
  please re-compile this module with an Erlang/OTP 25 compiler

escript: exception error: undefined function rebar:main/1
  in function  escript:run/2 (escript.erl, line 750)
  in call from escript:start/1 (escript.erl, line 277)
  in call from init:start_em/1 
  in call from init:do_boot/3 
make: *** [compile] Error 127

字符串
我使用命令-进一步安装了rebar 3

homebrew install rebar3

我在mac上运行Erlang OTP/25,我还不知道是不是

rebar3

ChicagoBoss
jfgube3f

jfgube3f1#

问题出在ChicagoBoss上,它包含一个用Erlang/OTP发行版17编译的rebar二进制文件,但Erlang/OTP发行版25只能使用用发行版21或更高版本编译的模块。
rebar二进制文件以#!/usr/bin/env escript行开头,这意味着它在PATH中查找escript。这会选择发行版25,从而导致此问题。您可以尝试安装发行版24或更早版本来解决此问题。
您可能会发现ASDF对于在Erlang版本之间切换非常有用:https://github.com/asdf-vm/asdf-erlang

相关问题