If you want to try out the new features in Erlang 21 before it's released, you will have to build it yourself, as there is no package available. Same thing if you want to run a patch release or configure Erlang with special options.
The ASDF version manager lets you have
multiple versions of Erlang, Elixir and Node.js on your machine at one time,
choosing the version based on the
.tool-versions config file.
Our Elxir deploy template has instructions for setting up ASDF.
List the available versions:
asdf list-all erlang
Install the release candidate:
asdf install erlang 21.0-rc2
As pointed out by Jared Smith (@sublimecoder, you can also point to a git ref in the code base on GitHub:
asdf install erlang ref:master