Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried to apply patch to my file with following command

patch -p0 < foo.patch

I got the following output

bash: patch: command not found

I have Centos 5.x server.

Please guide what to do in this case

share|improve this question

closed as not a real question by Michael Hampton, Joel E Salas, Zoredache, EEAA, kce Dec 12 '12 at 20:52

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

You install it. – Michael Hampton Dec 12 '12 at 19:46
up vote 11 down vote accepted

All you need to do is

sudo yum install patch
share|improve this answer
sudo yum install patch

If you have your yum repo configured correctly.

otherwise, find an rpm on the internet for your OS and do

rpm -ihv $urloftherpm
share|improve this answer

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