How to change elixir compiled OTP version

I have elixir 1.6.1 installed on my machine. But elixir -v puts that

Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:10] [hipe] [kernel-poll:false]

Elixir 1.6.1 (compiled with OTP 19)

I tried reinstall elixir but still OTP 19. How can i change compiled otp version ?

1 Like

I found, default elixir compiled with 19. Beacuse of asdf i saw Elixir 1.6.1 (compiled with OTP 20)


1 Like

Following instructions on will now get you:

  • Erlang/OTP 21
  • Elixir 1.6.5 (compiled with OTP 19)

I’m curious about the process for updating what goes into the package manager. The versions do inch up, but the version of Elixir is often compiled with an older version of Erlang than the one installed.

Well, on my system (arch linux) it gives OTP 20, Elixir 1.6.5 (with OTP 20).

So you need to be more specific about which Operating System/Distribution you are talking about.

But in general, the process depends on your distribution or the third party maintainer of the repository.

If you want bleeding edge, either switch to a bleeding edge distro (such as Gentoo or Arch, but even there it sometimes takes a week or two), use an environment manager like asdf or compile from source.

For the last two items the usual considerations about not using the distros package manager apply of course.

1 Like

Right you are! I was speaking of Ubuntu 16.04/17.04.

Just checking on my Windows machine now, I’m seeing Erlang/OTP 20 / Elixir 1.6.5 (compiled with OTP 19).

For those, you need to get in touch with @ErlangSolutions.

Are you using choco to install, a POSIX wrappers package manager or the prebuilt package? The former is maintained by and wraps the elixir prebuilt package. POSIX wrappers packages are in a similar situation as linux packages are, find the maintainer and ask them.

And that prebuilt package is actually built by the elixir team, @ericmj maintains the infrastructure AFAIK. But as far as I know, each built is done on the lowest supported erlang version, to maintain runtime compatibility, as you can safely run a OTP19 binary on a OTP 20 system, but not the other way round.

As far as I know, there are prebuilt packages available via the build server that match higher versions of OTP. They are not official though, and I can’t remember how to put together the URL to download them. Also I’m not sure if the built server has already been updated for OTP 21.

So if you really want to use the latest combination of elixir and ERTS possible, you need to use an environment manager, build from source, or use an operating system that generally is more bleeding edge.

I use apt-get.

On the Windows side, I prefer to avoid choco, though I’ve used it in the past. I go with the first option of the web installer (as well as WSL with Ubuntu for using things like Edeliver or Pry).

To be clear, I’m not concerned at all about not being on the bleeding edge. I just find it interesting that the version of Erlang is ahead of what’s used to compile Elixir.

Using asdf you can asdf install elixir 1.6.6-otp-21 (or use other otp version suffix)

1 Like

I prefer to avoid choco

Why? I like the idea of establishing a package manager for windows. Some of chocos concepts have some issues though, but hey, thats in the nature of windows :wink:

I just find it interesting that the version of Erlang is ahead of what’s used to compile Elixir.

Yeah, as I said already, for the official prebuilt archive, this is on purpose for maximum compatibility.

For the web-installer and the choco installer (which only wrap the prebuilt archive) the same is true.

Gentoo will always be built with the OTP available at the system of elixirs install time (as its a source distribution).

Arch will be built with the most current erlang that is available when the package is initially built.

I have no clue about why or how this is done on other distributions, but I think its mainly because no-one cares or even knows that this might be important for someone. So basically the easiest thing is done and the package simply wraps the prebuilt archive.

The builds we provide are documented here We precompile against all supported OTP versions, by default we provide the oldest version because it ensures maximum compatibility, but you can select any version. This is what asdf uses when you run asdf install elixir 1.6.6-otp-21


I remember you having said once something along the lines that the versions compiled with other OTPs weren’t officially supported, or was that only targeted at nightly builds made by bob?

I guess it depends on how you define official. The only official builds by Elixir are the ones attached to the releases on GitHub. The builds by bob are officially supported by the Hex team, which includes me who is a member of the Elixir team :slight_smile:. The bob builds are used by tools and services such as asdf and TravisCI.