I was trying to install rebar3 on Windows with WSL. After executing ./bootstrap, I got the error below. What seems to be the problem?
./bootstrap
Evaluating config script "/mypath/rebar3/_build/default/lib/rebar/src/rebar.app.src.script"
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling cf
===> Compiling cth_readable
===> Compiling eunit_formatters
===> Compiling vendor/eunit_formatters/src/eunit_progress.erl failed
vendor/eunit_formatters/src/eunit_progress.erl:none: undefined parse transform 'eunit_striptests'
escript: exception throw: rebar_abort
in function rebar_utils:abort/0 (apps/rebar/src/rebar_utils.erl, line 718)
in call from rebar_parallel:parallel_dispatch/4 (apps/rebar/src/rebar_parallel.erl, line 39)
in call from rebar_parallel:parallel_dispatch/4 (apps/rebar/src/rebar_parallel.erl, line 43)
in call from rebar_compiler:run/4 (apps/rebar/src/rebar_compiler.erl, line 253)
in call from lists:foreach/2 (lists.erl, line 1342)
in call from rebar_prv_compile:'-build_rebar3_apps/3-lc$^0/1-0-'/3 (apps/rebar/src/rebar_prv_compile.erl, line 374)
in call from rebar_prv_compile:build_rebar3_apps/3 (apps/rebar/src/rebar_prv_compile.erl, line 389)
in call from rebar_prv_compile:run_compilers/4 (apps/rebar/src/rebar_prv_compile.erl, line 192)
You’ve used sudo to download rebar3 using wget, so it is now owned by root. Try deleting it with sudo rm rebar3 and then running again that command you posted but without sudo.
Best to avoid using sudo unless you really have to as it can result in problems like these, and also there is a security risk to using it.
It looks like your Erlang installation is missing the eunit part and possibly others too. If you have installed it using your OS’s package manager you may need to install more packages to get the full installation.
Thanks, I also installed Erlang to Windows. Instead of using the uncomplete Erlang in WSL, how can I force rebar3 installation to use the Erlang installed on my C drive?
% erl
Erlang/OTP 24 [erts-12.2.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit]
Eshell V12.2.1 (abort with ^G)
% wget [https://s3.amazonaws.com/rebar3/rebar3](https://s3.amazonaws.com/rebar3/rebar3)
% chmod a=rx rebar3
% mv rebar3 ~/local/bin
% rebar3 version
===> Rebar dependency asn1 could not be loaded for reason {"no such file or directory",
"[asn1.app](http://asn1.app)"}
I was getting this kind of problem before, which is why I reinstalled rebar3.
(Yes I have tried getting the latest and greatest Erlang release, and no it didn’t work.)