"Can not link wx program" error when installing erlang

Checkout the comments in this issue https://github.com/asdf-vm/asdf-erlang/issues/203#issuecomment-846602541 specifically this comment, perhaps they might offer some help. Maybe you need to set this before runnig asdf install erlang ...

export KERL_CONFIGURE_OPTIONS="--enable-wx --with-wx-config=<absolute path to executable>"

You can get the path to the wx-config executable by running which wx-config