Skip to content

Install Zig from a Package Manager

Pat Tullmann edited this page Sep 22, 2023 · 56 revisions

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

When using a package manager, it is best to use a tagged release rather than using an option to install a development version.

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

Arch Linux

pacman -S zig

DragonFlyBSD (ravenports)

ravensw install zig-single-standard

Fedora

dnf install zig

Fedora Silverblue

rpm-ostree install zig

FreeBSD

pkg install lang/zig

Gentoo

# Building from sources
emerge -av dev-lang/zig
# Official ziglang.org static build
emerge -av dev-lang/zig-bin

Homebrew

brew install zig

MacPorts

port install zig

NixOS

nix-env -i zig

Ubuntu (snap)

snap install zig --classic --beta

Void Linux

xbps-install -Su zig

Windows (choco)

choco install zig

Windows (MSYS2)

pacman -S mingw-w64-x86_64-zig

Windows (scoop)

scoop install zig
Clone this wiki locally