gzip: stdin: not in gzip format, followed by tar: Child returned status 1, means tar was told to un-gzip a file that is not gzip. Ollama's Linux download is now ollama-linux-amd64.tar.zst, a zstd archive, so the -xzf flags from older install instructions no longer fit it. Replace the z with --zstd and the same file extracts.

For a real install the command is sudo tar -C /usr --zstd -xf ollama-linux-amd64.tar.zst. Plain -xf works too on a saved file, because GNU tar recognises zstd by itself; it is the z that breaks it. If what you downloaded is called ollama-linux-amd64.tgz, delete it: that name no longer points at an archive.

The error

$ tar -C out -xzf ollama-linux-amd64.tar.zst

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

Why it happens

The z in -xzf makes tar pipe the file through gzip. gzip looks for its own signature at the start of the stream, finds a zstd header instead (file reports "Zstandard compressed data"), and refuses; tar reports its helper's failure and stops before writing anything. The target folder stayed empty.

Ollama's own Linux docs once said, at the v0.5.7 tag for example, to download ollama-linux-amd64.tgz and run sudo tar -C /usr -xzf ollama-linux-amd64.tgz. The docs for v0.35.0 download the .tar.zst instead, and the release lists no Linux .tgz at all. The old link still redirects to GitHub, where it ends in a 404: curl -L exited 0 and saved a 9-byte file containing Not Found, and -xzf on that printed the same three lines. So there are two roads to this message: the right file with the wrong flag, or the wrong file.

The fix

$ ls -l ollama-linux-amd64.tar.zst
-rw-r--r-- 1 deploy deploy 1427765407 Oct  2 01:25 ollama-linux-amd64.tar.zst
$ file ollama-linux-amd64.tar.zst
ollama-linux-amd64.tar.zst: Zstandard compressed data (v0.8+), Dictionary ID: None
$ time tar -C out --zstd -xf ollama-linux-amd64.tar.zst

real	0m2.596s
user	0m1.728s
sys	0m3.315s
$ ls out out/bin out/lib/ollama
out:
bin
lib

out/bin:
ollama

out/lib/ollama:
...
cuda_v12
cuda_v13
...
vulkan
$ du -sh out
2.1G	out

out is a scratch folder standing in for /usr; swap it back and add sudo for a real install. A second run with plain tar -C out2 -xf produced an identical tree (diff -rq found no difference). If the download itself is suspect, check its size before extracting: v0.35.0 is 1,427,765,407 bytes, and a few bytes means you saved an error page. Add -f to curl and a missing file fails loudly instead: curl -fL on the old .tgz link printed curl: (22) The requested URL returned error: 404.

How it was reproduced

Ubuntu 24.04.4 under WSL2 with GNU tar 1.35, gzip 1.12 and zstd 1.5.5 (already installed). The archive was Ollama v0.35.0, downloaded once with curl -fL from ollama.com/download, and its SHA-256 matched the release's sha256sum.txt. Every extraction went into a scratch folder rather than /usr, so the Ollama 0.34.2 service already installed there was not touched. The old .tgz link was fetched with the exact curl -L line from the v0.5.7 docs.

Frequently asked

How do I extract ollama-linux-amd64.tar.zst on Linux?
Run sudo tar -C /usr --zstd -xf ollama-linux-amd64.tar.zst. On a saved file GNU tar also detects zstd by itself, so sudo tar -C /usr -xf works as well. Do not use the z flag; that means gzip.
How big is ollama-linux-amd64.tar.zst?
Version 0.35.0, the latest on 2 October 2026, was 1,427,765,407 bytes (ls -lh shows 1.4G) and unpacked to 2.1 GB: bin/ollama plus lib/ollama with the CUDA and Vulkan libraries. The ROCm build is a separate ollama-linux-amd64-rocm.tar.zst. Each release changes the size, so compare against the release's sha256sum.txt rather than a number.
Where did ollama-linux-amd64.tgz go?
Current releases ship the Linux build as .tar.zst only. On 2 October 2026 the old .tgz link redirected to the v0.35.0 release on GitHub and returned 404, so curl -L saved the text Not Found under the .tgz name. Download ollama-linux-amd64.tar.zst instead.

More decoded errors in the Fixes category. If tar complains that zstd itself is missing, or the install script stops for the same reason, see 'This version requires zstd for extraction'.