Bash on Win10 搭建 Elixir 开发环境

Bash on Win10 的 elixir 安装过程中会出现如下错误:

/usr/local/bin/elixir: 126: exec: erl: Is a directory

这是由于 esl-erlang 的 19.0 版本和 bash 不兼容所致。

可行的解决方案为安装 18.3,也就是18的最新版。

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

Refs:
https://github.com/Microsoft/BashOnWindows/issues/613
https://www.reddit.com/r/bashonubuntuonwindows/comments/4vz82i/elixir_installed_as_would_on_ubuntu_erl_is_a/?st=iwyn68ki&sh=0b8150c6

你可能感兴趣的:(Bash on Win10 搭建 Elixir 开发环境)