WSL: Erlang/Elixir no longer works

As of the latest build 14379 Erlang no longer works. I’ve tried lxrun /uninstall /full /y and reinstalled however it still doesn’t work. I’ve also attempted installing the previous version of Erlang 18.3.4.

Seems like it might be file system related, the error we get is erl: Is a directory

When i go to the directory it should be located in I get the following: no-erl

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Reactions: 15
  • Comments: 38 (3 by maintainers)

Most upvoted comments

I’ve installed it like that: wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && sudo dpkg -i erlang-solutions_1.0_all.deb sudo apt-get update sudo apt-get install esl-erlang=1:18.3 sudo rm /usr/bin/erl sudo ln -s /usr/lib/erlang/bin/erl /usr/bin/erl sudo apt-get install elixir

And it works on the official 14393 build, had to fix the simlink like @Andorbal suggested

The esl-erlang build which doesn’t seem to work on “bash on windows” is 19.0.2 image

image

Just an update that the fix for this has been checked in the dev branch and should soon hit the release branch.

Looks like the '/usr/bin/erl: Is a directory` error is caused by a bad symlink.

This is what the symlink looked like after installed esl-erlang: image

I fixed it manually: $ sudo ln -s ../lib/erlang/bin/erl erl and now it’s back to the Crash dump is being written to: error.

Comparing a strace of 19.1 on WSL with one on native Linux, it appears as if this would be the cruelprint:

118   sendmsg(6, {msg_name(0)=NULL, msg_iov(1)=[{"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\t\0\0\0\10\0\0\0\v\0\0\0\0\0\0\0", 32}], msg_controllen=32, [{cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, [9, 8, 11]}], msg_flags=0}, 0 <unfinished ...>
118   <... sendmsg resumed> )           = -1 EINVAL (Invalid argument)

Doing the same on Linux yields this:

3290  sendmsg(10, {msg_name(0)=NULL, msg_iov(1)=[{"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\r\0\0\0\f\0\0\0\17\0\0\0\0\0\0\0", 32}], msg_controllen=32, [{cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, [13, 12, 15]}], msg_flags=0}, 0 <unfinished ...>
3290  <... sendmsg resumed> )           = 32

The use of SCM_RIGHTS is new in 19.0. It was introduced in this commit: https://github.com/erlang/otp/commit/14c7fefd51be035a44bfe42127fb4b9df92d760b

#514 and #1326 are about the same problem with SCM_RIGHTS.

Make sure to purge esl-erlang first before installing the older version 1:18.3

Same problems on build 1493.3

  1. Updated to the Creators Update (version 1703).
  2. Did sudo do-release-upgrade in the Windows 10 Ubuntu bash shell.
  3. Version:
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS"
  1. elixir -v worked just fine:
$ elixir -v
Erlang/OTP 19 [erts-8.3] [source-d5c06c6] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]

Elixir 1.4.2

I followed @romerod installation advise, but I forgot to hold the package at the 18.3 release, After a while I carelessly apt-get upgraded and nothing worked and I had to reinstall 18.3.

So don’t forget to sudo apt-mark hold esl-erlang after installation until the issue is resolved.

Rather than bump this with +1’s. Are there steps we can take to help Microsoft reproduce or narrow down the issue? I’ve been trying each preview with the same results but I’d be happy to strace with specific flags.

The specific issue may seem unimportant since it’s not Ubuntu’s Erlang package but one from Erlang Solutions instead. The reality is that many (most?) Erlang and Elixir developers require more recent releases (think of this similar to telling someone to use node 0.10 or older for modern node dev).

same here

Still doesn’t work as of insider build 14385

image

@cgregfreeman OTP 20 looks to be working for me. Tested on 1703 (Build 15063.447)

Have there been any updates to this problem? It looks like it still persists on 19.1

+1

+1

Guys, this it totally possible, I’ve got it working. It was a huge hassle, and I haven’t done much stability testing, but it seems to work.

capture2 capture3

Effectively, this is what I did (sorry I can’t remember exact steps):

0.5) Modify your sudoers file to allow nopasswd for your account. 1.) Upgrade to the latest Ubuntu using http://www.omgubuntu.co.uk/2016/08/upgrade-bash-windows-10-ubuntu-16-04-lts 2.) Step 1 hosed my sudo, which was very hard to fix, so I suggest doing step 0.5 first! If your sudo is hosed like mine, the second solution of this article helped me: http://stackoverflow.com/questions/10232121/set-environment-variable-ssh-askpass-or-askpass-in-sudoers-resp 3.) sudo apt-get install erlang elixir 4.) upgrade to a newer elixir using exenv 5.) you should now have a working up-to-date elixir environment!

Looks like they’re pretty busy making fixes for the A release, telling from the latest entry on the release notes. Hopefully this is resolved before the official release on 8/2

@benhillis Still doesn’t work as of insider build 14388