gzip: stdin: not in gzip format / tar: Error is not recoverable: exiting now
The file isn’t actually a gzip archive — often an HTML error page saved by curl/wget, or an archive with a different compression.
Seen on:
Linux
Meaning
Downloading without following redirects (curl without -L) or from a URL requiring login saves an HTML page with a .tar.gz name. The file may also be plain tar, xz or zstd.
Common causes
- curl without -L saved a redirect/HTML page
- Download needs authentication (saved login page)
- Archive is .tar, .tar.xz or .zst, not gzip
- Incomplete download
⚡ Quick fix
- Check the real type: file archive.tar.gz
- Re-download with curl -L (and auth)
- Let tar auto-detect: tar -xf archive
Detailed fix by platform
Linux
- bash
file app.tar.gz head -c 200 app.tar.gz # HTML? curl -fLO https://example.com/app.tar.gz tar -xf app.tar.gz
How to diagnose
- Type — file output
- Size — Suspiciously small?
- URL — Redirects/auth?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in Linux
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026