使用 kerl 可以方便安装不同的Erlang版本。
kerl: https://github.com/yrashk/kerl
Easy building and installing of Erlang/OTP instances
下载kerl
curl -O https://raw.github.com/spawngrid/kerl/master/kerl
确保可执行
$ chmod a+x kerl
完了放到 $PATH 里
安装Erlnag
列出可用的版本
$ kerl list releases
Getting the available releases from erlang.org...
R10B-0 R10B-10 R10B-1a R10B-2 R10B-3 R10B-4 R10B-5 R10B-6 R10B-7 R10B-8 R10B-9 R11B-0 R11B-1 R11B-2 R11B-3 R11B-4 R11B-5 R12B-0 R12B-1 R12B-2 R12B-3 R12B-4 R12B-5 R13A R13B01 R13B02-1 R13B02 R13B03 R13B04 R13B R14A R14B01 R14B02 R14B03 R14B04 R14B_erts-5.8.1.1 R14B R15B01 R15B02 R15B02_with_MSVCR100_installer_fix R15B03-1 R15B03 R15B R16A_RELEASE_CANDIDATE R16B01 R16B02 R16B03-1 R16B03 R16B 17.0-rc1 17.0-rc2 17.0
Run "/home/lds/bin/kerl update releases" to update this list from erlang.org
最新的是Erlang 17,接下来安装Erlang 17
$ kerl build 17.0 17
17.0 是 版本号 17 是别名
列出已经编译的版本
$ kerl list builds
17.0,17
安装
$ kerl install 17 ~/bin
Installing Erlang/OTP 17.0 (17) in /home/lds/bin...
You can activate this installation running the following command:
. /home/lds/bin/activate
Later on, you can leave the installation typing:
kerl_deactivate
我安装到 ~/bin 里了
要active下
. /home/lds/bin/activate
安装完成