Trouble installing Erlang "configure: error: No curses library functions found"

I am suddenly having this issue when installing Erlang with mise (formerly rtx, an asdf alternative that uses asdf plugins).

I am on Ubuntu 23.10 and also use nix+home-manager to manage most of my packages (I still use some from apt).

I was also seeing this on my work macbook the other day when getting home-manager+nix-darwin setup there, but was able to fix it eventually, not really sure how.

Now I’m seeing it on Linux and am very confused.

I was thinking maybe that ncurses wasn’t installed, but I have ncurses6 installed via apt, then I saw something that it doesn’t distribute ncurses5 anymore, which is what asdf-elixir lists as a dependency.

I installed ncurses5 via a nix shell, but get the same result.

Any ideas?

mise ~/.local/share/mise/plugins/erlang/bin/install failed
Downloading kerl...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 74085  100 74085    0     0   453k      0 --:--:-- --:--:-- --:--:--  455k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  102M  100  102M    0     0  16.0M      0  0:00:06  0:00:06 --:--:-- 24.1M
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/mitchell/.local/share/mise/plugins/erlang/kerl-home/builds/asdf_26.1.2/otp_src_26.1.2/erts/configure failed!
./configure: 370: kill: No such process
3 Likes

Hi @mhanberg,
Did you find a solution / mitigation for this?
I am experiencing the same issue.

tia
~s-a-c

Yes, sorry i should have followed up.

The magic incantation is the following:

$ nix-shell --run "bash -c 'mise use erlang@25.3.2.12'" -p gcc -p mise -p ncurses5 -p autoconf -p automake -p openssl

Update: on Mac, I had to make sure that openssl was installed via homebrew (I was previously trying to remove homebrew entirely, but nix doesn’t seem to put dev headers in the path) and I had to do the following

$ nix-shell -p ncurses5 darwin.apple_sdk.frameworks.AGL darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa darwin.apple_sdk.frameworks.WebKit --run "bash -c mise use erlang@27.0 --verbose'"
2 Likes