Skip to content

Install Zig from a Package Manager

Jan edited this page Jan 15, 2021 · 56 revisions

Note: Official builds of master branch and releases are available for download.

See Repology for an overview of which package management systems and operating systems Zig has already been packaged for, and what the current packaged version is.

Packaging status

Homebrew

Latest tagged release

brew install zig

Latest build from Git master branch

brew install zig --HEAD

MacPorts

port install zig

Ubuntu (using snap)

Latest tagged release

snap install zig --classic --beta

Latest build from Git master branch

snap install zig --classic --edge

Ubuntu or Debian (using apt)

After you've completed the repository configuration, installation is as easy as the familiar:

sudo apt install zig

NixOS

nix-env -i zig

Windows (using scoop)

scoop install ziglang

Windows (using chocolatey)

choco install zig

Arch Linux

pacman -S zig

zig-static AUR - This package uses the official ziglang.org static build instead of building against source. In the event that the llvm version in [extra] is not up to date with the latest version used by zig, this package can be used since it has no llvm dependency.

Gentoo

emerge dev-lang/zig

Latest build from Git master branch

emerge '=dev-lang/zig-9999'

Void Linux

xbps-install -Su zig

DragonFlyBSD (using ravenports)

ravensw install zig-single-standard

Fedora

dnf copr enable sentry/zig 
dnf install zig
Clone this wiki locally