add Alpine unzip note

This commit is contained in:
Will Webberley 2022-09-27 19:52:23 +01:00
parent 1c912fdc7b
commit d4dafe911d

View File

@ -0,0 +1,29 @@
---
date: "2022-09-27T18:45:00Z"
title: Fixing unzip on Alpine Linux
description: "Replacing busybox unzip to fix extraction issues in Alpine Linux."
tags: [technology]
---
Alpine Linux ships with several [BusyBox](https://en.wikipedia.org/wiki/BusyBox) utilities, including many day-to-day shell commands.
One such example is the `unzip` tool for extracting ZIP files.
Recently, when unzipping a large archive on Alpine, I kept getting this `short read` error message:
```bash
$ unzip archive.zip
Archive: archive.zip
unzip: short read
$
```
I tried re-creating the archive a few times to see if it was an issue with the zip file itself, but to no avail. I still don't know what the `short read` error is referring to, but the only thing I can think of is the size of the file (around 100GB).
## Fixing the issue
To fix this, simply install the "full" `unzip` binary using `apk`:
```shell
apk add unzip
```