Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Please advice how to install the patch command on Ubuntu Linux

I download the following file , patch_2.6-2ubuntu1_amd64.deb ( from site - http://packages.ubuntu.com/lucid/patch )

But not clearly how to install it?

I tried by ./patch_2.6-2ubuntu1_amd64.deb , ( but I get errors )

Please advice how to install the pkg patch_2.6-2ubuntu1_amd64.deb In order to use thepatch command on my unbuntu linux

share|improve this question

3 Answers 3

".deb" files are not executable binaries. Use dpkg command to install your package :

dpkg -i your_package.deb
share|improve this answer

This website tells you that the package is in the repository. You should not download the package from the website to install it.

You should use your package manager :

sudo apt-get install patch
share|improve this answer
    
the problem is that I not connected to the network , I guess this will dowload the pkg from network –  Eytan Apr 8 at 19:58
    
@Eytan Yes it downloads the package (you can also use the install cd as repository, but I don't know what's on it). In that case use dpkg. –  Leiaz Apr 8 at 20:18

since your patch is tar.gz a simple way to install is to get alien

sudo apt-get install alien

then turn tar.gz into deb

sudo alien -k file.tar.gz
share|improve this answer
    
"since your patch is tar.gz" why do get information? The OP clearly indicates a downloaded a .deb file of the patch command. –  Anthon Nov 22 at 11:18

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.