19

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

Sukhjinder Singh
  • 393
  • 1
  • 3
  • 12

2 Answers2

33

All you need to do is

sudo yum install patch
user9517
  • 113,143
  • 20
  • 201
  • 283
Tom O'Connor
  • 27,353
  • 10
  • 71
  • 148
4
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
user9517
  • 113,143
  • 20
  • 201
  • 283
johnshen64
  • 5,687
  • 21
  • 17