Errors when using asdf install - configure: error: No curses library functions found

I’m trying to install a version of Erlang using asdf and I get this:

$ asdf install
elixir 1.14.3-otp-25 is already installed
asdf_25.2.3 is not a kerl-managed Erlang/OTP installation
The asdf_25.2.3 build has been deleted
Extracting source code
Building Erlang/OTP 25.2.3 (asdf_25.2.3), please wait...
[packages] Probe failed for libssl-dev (distro: ubuntu): probe "dpkg-query -Wf'${db:Status-abbrev}' "libssl-dev" 2>/dev/null | \grep -q '^i'" returned 1
[packages] Probe failed for automake (distro: ubuntu): probe "dpkg-query -Wf'${db:Status-abbrev}' "automake" 2>/dev/null | \grep -q '^i'" returned 1
[packages] Probe failed for autoconf (distro: ubuntu): probe "dpkg-query -Wf'${db:Status-abbrev}' "autoconf" 2>/dev/null | \grep -q '^i'" returned 1
[packages] Probe failed for libncurses5-dev (distro: ubuntu): probe "dpkg-query -Wf'${db:Status-abbrev}' "libncurses5-dev" 2>/dev/null | \grep -q '^i'" returned 1
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/jauggy/.asdf/plugins/erlang/kerl-home/builds/asdf_25.2.3/otp_src_25.2.3/erts/configure failed!
./configure: 370: kill: No such process

I’m running the command on WSL (Ubuntu v22.04). This is the first time I’ve used asdf so no idea what’s wrong. The .tool-versions file shows:

erlang 25.2.3
elixir 1.14.3-otp-25

Looking at the documentation here:
asdf-vm/asdf-erlang: Erlang plugin for asdf version manager (github.com)
it says I might have to run:

apt-get -y install build-essential autoconf m4 libncurses5-dev libwxgtk3.0-gtk3-dev libwxgtk-webview3.0-gtk3-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils libncurses-dev openjdk-11-jdk

but not sure if that’s overkill and instead should I just be installing the four that I’m missing (libssl-dev, automake, autoconf, libncurses5-dev).

Hi, I would advise to go with asdf-erlang advice.

What do you mean “overkill”? They are normal dependencies, many software packages need other software packages to function.

The docs mention specific versions of Ubuntu and my version is higher. So I thought the dependencies mentioned in the docs only applies to those specific versions of Ubuntu or lower.

No, Ubuntu version has nothing to do with this, they are dependencies of Erlang.