WSL is a driver shim for Windows 10 that enables you to run native Linux code on Windows without recompiling or running a Docker/VM. It currently supports Ubuntu 16.04 LTS - but more distribution support has been announced.
From a "clean" install of Ubuntu such as the kind you would get from a fresh install of WSL, you need to preinstall these debs to enable kerl to compile a working Erlang:
$ sudo apt install libssl-dev automake autoconf libncurses5-dev gcc
(N.B. You will need to add xsltproc
to the list of libraries if you want to build/install Erlang's documentation.)
Then you should clone the kerl repo to your box:
$ git clone https://github.com/kerl/kerl
$ cd kerl
Or if you prefer curl -O https://raw.githubusercontent.com/kerl/kerl/master/kerl; chmod +x kerl
$ export KERL_BUILD_BACKEND=git
$ ./kerl update releases
Select an Erlang release to build. For example:
$ ./kerl build 19.3.3 19.3.3
Once that completes, you'll want to select a place to install your Erlang. For example:
$ ./kerl install 19.3.3 ~/erlangs/19.3.3
Then, activate your new installation
$ . ~/erlangs/19.3.3/activate
$ erl
Erlang/OTP 19 [erts-8.3.3] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V8.3.3 (abort with ^G)
1> {erlang_installed, true}.
{erlang_installed,true}
2>
Would be nice to see this updated for 2020. I could not get this to work.