ERROR: This version requires zstd for extraction. Please install zstd and try again — the Ollama Linux installer downloads a zstd-compressed archive and stops when the zstd tool is missing. Install it with your package manager and run the installer again; nothing else is wrong.

On Ubuntu and Debian the fix is one line: sudo apt-get install -y zstd. On RHEL, CentOS and Fedora it is sudo dnf install zstd, on Arch sudo pacman -S zstd. Then repeat the install command exactly as before.

The error

>>> Installing ollama to /usr/local
ERROR: This version requires zstd for extraction. Please install zstd and try again:
  - Debian/Ubuntu: sudo apt-get install zstd
  - RHEL/CentOS/Fedora: sudo dnf install zstd
  - Arch: sudo pacman -S zstd

Why it happens

Newer Ollama releases ship their Linux bundle as a .tar.zst archive rather than gzip, because the bundle carries the CUDA and ROCm libraries and zstd shrinks it considerably. The install script checks for the zstd binary before it downloads anything, and a fresh Ubuntu 24.04 server does not have it: tar knows how to call it, but the tool itself is a separate package. A minimal cloud image or a fresh WSL distribution is the most common place to meet this.

The fix

sudo apt-get install -y zstd
curl -fsSL https://ollama.com/install.sh | sh

The installer prints the same three package-manager lines it printed in the error, so the message is its own fix. If you are scripting the install for several servers, put the zstd line before the curl line and the problem never appears.

What the AI got wrong: the automation piped the installer straight into sh on a fresh distribution and read only the last line of its log, so the first sign of trouble was "ollama: command not found" three steps later. The actual cause was four lines up. Read the whole log of a failed installer before retrying it.

Where it bit us

Season four, Part 4: installing the runtime on the server, on a fresh Ubuntu 24.04 under WSL2. The install looked like it had run and had not; the service was inactive because there was no binary to run. Installing zstd and re-running the same command took under a minute.

Frequently asked

Why does the Ollama installer need zstd?
Recent Linux releases ship the runtime and its GPU libraries as a zstd-compressed tar archive. The install script extracts it with the zstd tool, which is not installed by default on minimal Ubuntu, Debian, RHEL or Arch images.
How do I install zstd on Ubuntu for Ollama?
Run sudo apt-get install -y zstd, then run the Ollama install command again. On RHEL-family systems use sudo dnf install zstd; on Arch use sudo pacman -S zstd.
Can I install Ollama on Linux without zstd?
Not with the current install script. You could download an older gzip release manually, but the supported path is to install zstd, which is a small package, and let the script run normally.

More decoded errors in the Fixes category, or start the season that produced this one at Part 1.