Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have version 6.0-4ubuntu1 installed, but here ftp://ftp.info-zip.org/pub/infozip/src/ i see only version 6.0.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

If you want the current version (that you have installed) first check what package we're really talking about:

$ dpkg -S `which unzip`
unzip: /usr/bin/unzip

Not all binaries belong to a package of the same name. This one does.
When you know the package, you can download the source that went into it, like so:

apt-get source unzip

Of course that requires you to have the source repositories enabled but that's simple enough to fix if you don't.

To compile it you'll need unzip's dependencies. Again, apt-get can help:

sudo apt-get build-dep unzip

And then you can follow the standard instructions for the application you're compiling (usually some form of ./configure and make) but you may wish to package it before installing. checkinstall comes in pretty handy here as a quick package builder. See this for more:

share|improve this answer
    
thank you. A few more questions. Where is the downloaded source go, and is it safe to just edit and recompile it? –  michel Sep 4 '13 at 15:20
    
It should get downloaded to the current working path. If you want to recompile it you'll need to sudo apt-get build-dep unzip before you can compile it. Warning: for some packages the build-dep is epic. –  Oli Sep 4 '13 at 15:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.