erl/zx

Peter Harpending
2026-05-02 15:43:54 -07:00
parent ce3497fddd
commit d597777d07
+85 -4
@@ -1,12 +1,93 @@
# Installing Erlang and zx/zomp
Last updated: September 23, 2025 (PRH).
- Author: Peter Harpending `<peterharpending@qpq.swiss>`
- Created: 2025-09-24
- Modified: 2026-05-02
## Linux
# Installing with man pages
### Ubuntu
Assuming you go through the normal kerl-based installation procedure outlined
below, and you want man pages to be installed so `man gen_server` Just Works™,
**either**:
Source: [*Building Erlang 26.2.5 on Ubuntu 24.04*](https://zxq9.com/archives/2905)
- **before building**: set environment variable `KERL_BUILD_DOCS=yes`, and make
sure you have dependencies
```
apt install xsltproc fop openjdk-25-jre
```
- **after building**: go to <https://erlang.org/downloads>, download the
manpages tarball, extract it `~/.erts/28.3/` (whatever install dir you
chose...)
# Linux
## Devuan 6 Excalibur
1. **Install necessary build tools**
```bash
sudo apt update
sudo apt upgrade
sudo apt install \
gcc curl g++ dpkg-dev build-essential automake autoconf \
libncurses-dev libssl-dev flex xsltproc libwxgtk3.2-dev \
wget vim git fop openjdk-17-jre
```
2. **Put [Kerl](https://github.com/kerl/kerl) somewhere
in your `$PATH`**. This is a tool to build Erlang releases.
```bash
wget -O ~/bin/kerl https://raw.githubusercontent.com/kerl/kerl/master/kerl
chmod u+x ~/bin/kerl
```
3. **Build Erlang from source using Kerl (this takes a long time)**
Substitute `28.1` with whatever version of Erlang you're trying to build
```bash
kerl update releases
## use the most recent one that looks stable
## you do need to type the number twice, that's not a typo
KERL_BUILD_DOCS=yes kerl build 28.1 28.1
kerl install 28.1 ~/.erts/28.1
```
4. **Put Erlang in your `$PATH`**
Update `~/.bashrc` or `.zshrc` or whatever with the following line:
```bash
. $HOME/.erts/28.1/activate
```
Again substituting `28.1` with whichever version of Erlang you built
5. **Install zx**
```bash
wget -q https://zxq9.com/projects/zomp/get_zx && bash get_zx
```
6. **Test zx works**
zx installs itself to `~/bin`, so make sure that's in your
`$PATH`.
```bash
zx run erltris
```
## Ubuntu
- [Source: *Building Erlang 26.2.5 on Ubuntu 24.04*](https://zxq9.com/archives/2905)
- [Video tutorial (Ubuntu 18.04, March 2021)](https://www.youtube.com/watch?v=KQZc7EB8BVY)
Adapt this to your Linux distribution.