How to unzip on Amazon Linux 2? [closed]
Asked Answered
D

1

8

I have a file names awscliv2.zip and I'm trying to unzip it.

So first I tried:

unzip awscliv2.zip

But got:

-bash: unzip: command not found

And then I tried:

tar xvf awscliv2.zip

But got:

tar: This does not look like a tar archive

tar: Skipping to next header

tar: Exiting with failure status due to previous errors

Draconic answered 21/8, 2020 at 7:50 Comment(1)
Consider using Python's zipfile module. That said, Stack Overflow is only for questions about writing code; a question about available tools on a specific Linux distro is a better fit for Unix & Linux or Super User.Feverfew
O
15

You can install unzip using:

sudo yum install unzip
Ogle answered 21/8, 2020 at 7:52 Comment(3)
If you are using Amazon-Linux 2 then unzip package is already install. you can fire the command like this ``` unzip your-file.zip```.Odum
@Odum ``` > [5/6] RUN unzip server.zip: 0.420 /bin/sh: unzip: command not found```Fortuna
it seems it is not installed, you can install using sudo apt-get install zip unzipOdum

© 2022 - 2024 — McMap. All rights reserved.