How to get latest Elixir using asdf?

Please help me.
I want to update to the latest Elixir. using asdf
I tried to install Erlang. However, I get the following error:

$asdf install erlang 22.2.2
Downloading OTP-22.2.2.tar.gz to /home/sasagawa/.asdf/plugins/erlang/kerl-home/archives
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 122 0 122 0 0 225 0 --:–:-- --:–:-- --:–:-- 225
100 53.1M 0 53.1M 0 0 4621k 0 --:–:-- 0:00:11 --:–:-- 4336k
Extracting source code
Building Erlang/OTP 22.2.2 (asdf_22.2.2), please wait…
WARNING: It appears that a required development package ‘libssl-dev’ is not installed.
WARNING: It appears that a required development package ‘libncurses5-dev’ is not installed.
Configure failed.
checking for kstat_open in -lkstat… (cached) no
checking for tgetent in -ltinfo… no
checking for tgetent in -lncurses… no
checking for tgetent in -lcurses… no
checking for tgetent in -ltermcap… no
checking for tgetent in -ltermlib… no
configure: error: No curses library functions found
ERROR: /home/sasagawa/.asdf/plugins/erlang/kerl-home/builds/asdf_22.2.2/otp_src_22.2.2/erts/configure failed!
./configure: 343: kill: No such process

I tried to install libssl-dev and libncurses5-dev but get an error.

Elixir1.10 could be installed with asdf. But Erlang doesn’t work.

I use Linux Mint 18.1 “Serena” MATE.

I install the versions:

elixir         1.10.0  
erlang         22.1.8

Here a complete install with Linux in portuguese with the @akitaonrails but it’s posible to understand just watching or you can put translation of the subtitle:

and you can begin in the time 41:06 for install the libraries and after this begins the instalation with the asdf.
If you are a Mac OS user you can install the libraries with Homebrew as well.

1 Like

Thank you.

1 Like

You don’t have the libraries neccesary to build erlang on Ubuntu look here https://github.com/asdf-vm/asdf-erlang#before-asdf-install

3 Likes

Thank you.

2 Likes

You are welcome.

1 Like

I gave up on installing Erlang via asdf on Mac. It’s for some time that I use this setting: Installed Erlang using brew and the precompiled version Elixir using asdf (for which, the version looks like 1.10.0-otp-22).

Do not use brew, I wrote a guide to install asdf on Mac, I can searched for it if you needed it.

Here is my guide use git asdf Mac guide

Thank you very much. I was able to update to the latest version.

The software index was corrupted. I managed to fix it using aptitude.

The information from everyone was very helpful. Thank you very much.

2 Likes

I faced the same issue while installing 26.2.1 using asdf on MacOS Ventura v13.6.1.

asdf_26.2.1 is not a kerl-managed Erlang/OTP installation
The asdf_26.2.1 build has been deleted
Extracting source code
Building Erlang/OTP 26.2.1 (asdf_26.2.1), please wait...
Configure failed.
checking whether lock counters should be enabled... no
checking for kstat_open in -lkstat... (cached) no
checking for tgetent in -ltinfo... no
checking for tgetent in -lncurses... no
checking for tgetent in -lcurses... no
checking for tgetent in -ltermcap... no
checking for tgetent in -ltermlib... no
configure: error: No curses library functions found
ERROR: /Users/akash/.asdf/plugins/erlang/kerl-home/builds/asdf_26.2.1/otp_src_26.2.1/erts/configure failed!
./configure: line 370: kill: (-9950) - No such process

Please see /Users/akash/.asdf/plugins/erlang/kerl-home/builds/asdf_26.2.1/otp_build_26.2.1.log for full details.

Somehow, the compiler failed to find ncurses. Even after updating development toolchain.

Solved by explicitly setting pkg-config path and then installing

$ export PKG_CONFIG_PATH="/usr/local/opt/ncurses/lib/pkgconfig"
$ asdf install erlang 26.2.1

Not a direct answer but you may want to try https://mise.jdx.dev which is basically a drop-in replacement for asdf (written in Rust).

Mise looks interesting. But I don’t think the issue is related to asdf. If it was only me, then I would just remove asdf and use nix.

Hopefully the mise-r’s don’t rename their project again because they don’t like being associated with “miserable” vs a leading graphics card.

What a PITA renaming from rtx to mise.

Wait what? rtx got a French name now? Interesting…

I like mise (which I still know as RTX) a lot. Besides dependencies you can inject ENV files from .env files and more. It comes with its own config file but also supports asdf’s .tool-versions which I’m still using as it is supported by the setup-beam GitHub action. This way my CI uses the same version as my local env.

1 Like

Rtx is a much better asdf for sure.

I’m just salty they went and did what I feel is unnecessary renaming and senseless churn for everyone.

I hadn’t heard of mise before, glad to have discovered it. Been a long time user of asdf and I’m curious to see how this will perform instead.

1 Like