Installing more than one version of Erlang/OTP on a machine
I use Kerl to install Erlang on my machines. Quite easy to use, and allows to have several Erlang systems installed on same machine. You can then easily choose the one you want to use.
Yes, I usually install different versions in my home directory. I build them from source:
./configure --prefix=$HOME/r15b01
make && make install
Then I can choose a version to use with PATH=$HOME/r15b01/bin:$PATH
, and compile and run things as usual.
These days I use asdf for this. Install asdf
and add the relevant line to your .bashrc
, and then run:
asdf plugin add erlang
asdf install erlang 22.3.3
asdf install erlang 23.0.2
Then you can set one of the Erlang versions you just built as the default version:
asdf global erlang 23.0.2
Or you can set it to be used in the current directory and its subdirectories - this will create a .tool-versions
file in the current directory:
asdf local erlang 22.3.3
It is no only possible, but also very frequent. On my machine I have one version that I installed for development (R13B03) it is the default version when I launch erl. A second copy of the same version associated with nitrogen. this copy is used when I start my nitrogen website. The version will not change when I will use the R16B.. for development A partial older version which came with the installation of Wings3D.