Elixir runs on the Erlang virtual machine, so Erlang/OTP must be installed. The plugin declares a dependency on the erlang plugin in metadata.lua, but vfox does not install dependencies, so install Erlang/OTP yourself.
Two steps need it:
- A source build (Linux and macOS) compiles Elixir with the
erlcof an Erlang/OTP install. - Running
elixir,iexormixon any platform needserl.
vfox exec adds only the directory of the Elixir it runs to PATH, so name Erlang/OTP in the same command: vfox exec erlang@26.2.3 elixir@1.16.2 -- elixir --version.
vfox-erlang installs Erlang/OTP from source:
vfox add erlang
vfox install erlang@26.2.3
vfox use -g erlang@26.2.3Building Erlang/OTP needs system packages first. On Ubuntu 24.04 the E2E workflow installs:
sudo apt-get update -y
sudo apt-get install -y build-essential autoconf m4 libncurses-dev libssl-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils openjdk-11-jdkOn Linux the workflow leaves out wxWidgets: Erlang/OTP builds without it, and its wx applications are not built. On macOS the workflow installs:
brew install autoconf libxslt fop wxwidgets opensslThe package names differ between distributions, so check the vfox-erlang documentation for your system.
On Linux and macOS, keep spaces out of the vfox home. Erlang/OTP's configure step does not quote paths, so a space in the path makes its source build fail. On Windows the official installer does not build anything, so the configure rule does not apply there.
Elixir supports only some Erlang/OTP versions. The official table for Elixir 1.16.2 (checked on 2026-11-23) lists:
| Elixir | Supported Erlang/OTP |
|---|---|
| 1.16 | 24 to 26 |
| 1.15 | 24 to 26 |
| 1.14 | 23 to 25, and 26 from v1.14.5 |
For 1.16.2, use Erlang/OTP 26.2.3, which the examples in this documentation use. The table has no entry for OTP 27 or later with Elixir 1.16. For other versions, read the table for that version: https://hexdocs.pm/elixir/<version>/compatibility-and-deprecations.html, for example the 1.16.2 page.
The OTP number in an Elixir name (-otp-26, -elixir-otp-26) must match the Erlang/OTP you run.
A source build needs an erlc. The plugin looks in this order and uses the first match:
erlconPATH. This includes the Erlang/OTP thatvfox use -gput onPATH, and any othererlconPATH.- vfox's own Erlang cache:
erlcinside<VFOX_HOME>/cache/erlang, searched up to six directories deep.vfox install erlang@26.2.3stores Erlang/OTP there. A source build keeps itserlcinrelease/bin, which is taken first; thenbinandlib/erlang/bin, where a prebuilt install keeps it. OTP'sbootstrapdirectory is never used, because its Erlang/OTP has nomakemodule.<VFOX_HOME>is vfox's home directory. - mise's Erlang/OTP installs:
$MISE_DATA_DIR/installs/erlang, or~/.local/share/mise/installs/erlangwhenMISE_DATA_DIRis not set, searched up to six directories deep.
The directory of the erlc that was found is put first on PATH while make runs. If none is found, the install stops with an error, see troubleshooting.md.
A hex prebuilt install does not look for erlc, but it still needs erl when you run Elixir.
The official Windows installer does not need Erlang/OTP to finish. Running Elixir does: elixir.bat calls erl. Select Erlang/OTP before you use Elixir:
vfox use -g erlang@26.2.3
Invoke-Expression "$(vfox activate pwsh)"
& erl.exe -eval 'erlang:display({otp_release, erlang:system_info(otp_release)}), halt().' -noshellThe last command prints the Erlang/OTP major version.