This repository contains instructions for installing the Zig programming
language and toolchain on the Ubuntu and Debian operating systems, as well
as the debuild
configuration for building the corresponding binary
packages from the upstream tarballs.
Currently, x86-64 (aka AMD64) binary packages are available for all recent Ubuntu and Debian releases:
Distribution | Alias | AMD64 |
---|---|---|
Ubuntu 20.10 | Groovy | ✔ |
Ubuntu 20.04 LTS | Focal | ✔ |
Ubuntu 19.10 | Eoan | ✔ |
Ubuntu 18.04 LTS | Bionic | ✔ |
Debian 11 | Bullseye | ✔ |
Debian 10 | Buster | ✔ |
Debian unstable | Sid | ✔ |
Once you've completed the repository configuration (see further below), installation is as easy as the familiar:
$ sudo apt install zig
Alternatively, you can just download the latest .deb
file and install
that directly with dpkg
:
$ wget https://github.com/dryzig/zig-debian/releases/download/0.6.0-1/zig_0.6.0-1_amd64.deb
$ sudo dpkg -i zig_0.6.0-1_amd64.deb
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 379CE192D401AB61
$ echo 'deb https://dl.bintray.com/dryzig/zig-ubuntu groovy main' | sudo tee -a /etc/apt/sources.list
$ sudo apt update
$ echo 'deb https://dl.bintray.com/dryzig/zig-ubuntu focal main' | sudo tee -a /etc/apt/sources.list
$ sudo apt update
$ echo 'deb https://dl.bintray.com/dryzig/zig-ubuntu eoan main' | sudo tee -a /etc/apt/sources.list
$ sudo apt update
$ echo 'deb https://dl.bintray.com/dryzig/zig-ubuntu bionic main' | sudo tee -a /etc/apt/sources.list
$ sudo apt update
$ echo 'deb https://dl.bintray.com/dryzig/zig-debian bullseye main' | sudo tee -a /etc/apt/sources.list
$ sudo apt update
$ echo 'deb https://dl.bintray.com/dryzig/zig-debian buster main' | sudo tee -a /etc/apt/sources.list
$ sudo apt update
$ wget https://ziglang.org/download/0.6.0/zig-linux-x86_64-0.6.0.tar.xz
$ tar xvf zig-linux-x86_64-0.6.0.tar.xz
$ ln -s zig-linux-x86_64-0.6.0 zig-0.6.0
$ tar cJhf zig_0.6.0.orig.tar.xz zig-0.6.0
$ cd zig-0.6.0
$ git clone https://github.com/dryzig/zig-debian.git debian
$ debuild