Environment:
1. Ubuntu 20.04.6 LTS
2. Erlang/OTP 22 [erts-10.6.4] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
Eshell V10.6.4
3. Erlang/OTP 22 [erts-10.6.4] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
Elixir 1.9.1 (compiled with Erlang/OTP 22)
Exception:
escript: exception error: undefined function rebar3:main/1
in function escript:run/2 (escript.erl, line 758)
in call from escript:start/1 (escript.erl, line 277)
in call from init:start_em/1
in call from init:do_boot/3
See the answer for more details.
[Solved] Installing from the source erlang, rebar3.
Steps:
sudo apt-get purge erlang elixirsudo apt autoremove./configure && make && make installchmod u+x rebar3./rebar3 local installmv rebar3 /usr/local/bin/rebar3 --versionfrom any dir.From what I see, the root causes are in bold.