31

trying to unzip a file so im trying the following command Sorry im really quite new to linux

btw this is Ubuntu server latest release.

user@serverubuntu:~/minecraft/server$ ls
rtk.zip
user@serverubuntu:~/minecraft/server$ sudo unzip rtk.zip
sudo: unzip: command not found
user@serverubuntu:~/minecraft/server$ 

When I try without sudo I get this

user@serverubuntu:~/minecraft/server$ unzip rtk.zip
Sorry, command-not-found has crashed! Please file a bug report at:
https://bugs.launchpad.net/command-not-found/+filebug
Please include the following information with the report:

command-not-found version: 0.3
Python version: 3.2.3 final 0
Distributor ID: Ubuntu
Description:    Ubuntu 12.10
Release:    12.10
Codename:   quantal
Exception information:

unsupported locale setting
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/CommandNotFound/util.py", line 24, incrash_guard
    callback()
  File "/usr/lib/command-not-found", line 69, in main
    enable_i18n()
  File "/usr/lib/command-not-found", line 40, in enable_i18n
    locale.setlocale(locale.LC_ALL, '')
  File "/usr/lib/python3.2/locale.py", line 541, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

Thanks in advace

EDIT - The zip file I had turned out to be corrupt.

  • 4
    Are you sure you have unzip installed? If not, sudo apt-get install unzip – carnendil Feb 26 '13 at 22:00
  • Just installed and got this back when unzipping. user@serverubuntu:~/minecraft/server$ unzip rtk.zip Archive: rtk.zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of rtk.zip or rtk.zip.zip, and cannot find rtk.zip.ZIP, period. user@serverubuntu:~/minecraft/server$ – Valkyrie0512 Feb 26 '13 at 22:08
  • 2
    @Valkyrie0512, the End-of-central-directory thing means the zip is invalid. Redownload it and you will be good to go. – Matt Feb 26 '13 at 22:53

1 Answers1

57

You probably need to install unzip

sudo apt-get install zip unzip

as far as your error message, yes you should probably file a bug report on that one.

"How do I report a bug?"

Panther
  • 102,067
  • 1
    No luck, Received this. user@serverubuntu:~/minecraft/server$ unzip rtk.zip Archive: rtk.zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of rtk.zip or rtk.zip.zip, and cannot find rtk.zip.ZIP, period. user@serverubuntu:~/minecraft/server$ – Valkyrie0512 Feb 26 '13 at 22:07
  • 3
    @Valkyrie0512 That means either the file isn't a zip file after all despite its name, or the file is corrupted (possibly truncated). What does file rtk.zip show? Can you verify the size of the zip file? – Gilles 'SO- stop being evil' Feb 26 '13 at 22:09
  • or that the archive was corrupt. – Panther Feb 26 '13 at 22:11
  • Ahh my bad, turns out the fil is courrupted – Valkyrie0512 Feb 26 '13 at 22:19
  • For CentOs, this worked: yum install zip unzip – shasi kanth Mar 13 '14 at 12:14
  • Thanks. THis worked. You can also run sud apt install unzip – Promise Preston May 11 '22 at 22:01