27

I have installed Ubuntu 12.04 server , shows

E:unable to locate the package unzip

the above error is also shown, if I try to install packages also. Can any one help me out to get out from this error.

6
  • 1
    provide the complete error report from pastebin . we can have a look then .
    – Raja G
    Commented Jul 10, 2012 at 6:36
  • 1
    Please also specify what packages you try to install. Standard (essential) compression utilities in Ubuntu are gzip**/**gunzip not unzip.
    – Takkat
    Commented Jul 10, 2012 at 7:08
  • @Takkat unzip is also a standard compression utility, provided by the package of the same name. It decompresses .zip files (whereas gunzip decompresses .gz files). user76114: Please edit your question to provide the information imwrng requested, and also the contents of the file /etc/apt/sources.list. Commented Jul 14, 2012 at 2:05
  • @EliahKagan: For DEB packages zip is not standard. As gzip is an essential package the OP should definitely not see this error on "installing packages". We won't find out as this Q looks a bit abandoned to me.
    – Takkat
    Commented Jul 14, 2012 at 8:00
  • @Takkat The OP certainly would see this error on "installing packages" if the packages being installed include unzip or anything that depends on it. Since the Ubuntu Server system is now installed, the problem before us is to figure out why this error is happening when installing other software on the system. Commented Jul 14, 2012 at 13:10

2 Answers 2

41

Type sudo apt-get update to get the lists updated.

If its the first time you are running this command, it would download something like 20 MB of data.

Then type sudo apt-get upgrade to install the updates, if you want.

You can avoid this step, if you want to install updates later.

After first step finishes successfully, you should be able to install the package unzip by typing sudo apt-get install unzip.

0
6

I just had the same problem on a fresh Rack space install of 12.04. The solution:

sudo apt-get install zip -y

This installed both zip and unzip.

3
  • can you please help me with what does -y means with sudo? Commented May 21, 2022 at 19:22
  • got it @Sam it means yes... thanks Commented May 21, 2022 at 19:30
  • For future readers, it doesn't just mean "yes", it means "assume "yes" as answer to all prompts and run non-interactively." See superuser.com/a/1436171/64024
    – Ben
    Commented Apr 26, 2023 at 21:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .