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
  • 4
  • 12

2 Answers2

33

All you need to do is

sudo yum install patch
user9517
  • 114,104
  • 20
  • 206
  • 289
Tom O'Connor
  • 27,440
  • 10
  • 72
  • 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
  • 114,104
  • 20
  • 206
  • 289
johnshen64
  • 5,747
  • 23
  • 17