简体   繁体   English

RHEL 5:无法应用补丁

[英]RHEL 5: Unable to apply patch

I was following this WebSite for installing repcache on Memcached1.4.5 我遵循此网站在Memcached1.4.5上安装repcache

http://forums.famillecollet.com/viewtopic.php?id=252 http://forums.famillecollet.com/viewtopic.php?id=252

Initially i downloaded this repcached-2.3-1.4.5.patch.gz 最初我下载了这个repcached-2.3-1.4.5.patch.gz

I am using RHEL5 我正在使用RHEL5

Then i run 然后我跑

gunzip repcached-2.3-1.4.5.patch.gz

It generated a file named repcached-2.3-1.4.5.patch 它生成了一个名为repcached-2.3-1.4.5.patch的文件

Then executed 然后执行

patch -p1 -i repcached-2.3-1.4.5.patch

It started Producing this 它开始生产这个

patching file ChangeLog.repcached
can't find file to patch at input line 66
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -urN memcached-1.4.5/Makefile.am memcached-1.4.5-repcached-2.3/Makefile.am
|--- memcached-1.4.5/Makefile.am        Sat Apr  3 11:07:16 2010
|+++ memcached-1.4.5-repcached-2.3/Makefile.am  Thu Feb 11 19:51:30 2010
--------------------------
File to patch: 

please see the screen shot of the above 请看上面的截屏

在此处输入图片说明

If I see that correctly you are trying to patch the binary rpm package with a source code patch. 如果我没看错,您正在尝试使用源代码补丁来修补二进制rpm软件包。 That obviously cannot work. 这显然行不通。

You can try to do that by using the source rpm instead of the binary rpm. 您可以尝试使用源rpm而不是二进制rpm来做到这一点。 The source rpm is the 'source package' used to generate a binary rpm package that can be installed. 源rpm是用于生成可安装的二进制rpm包的“源包”。 It is typically called somesoftware-xxx.src.rpm . 它通常称为somesoftware-xxx.src.rpm If you install such source rpm package you get the content unpacked under /usr/src/packages/... , in there is a SOURCE folder where you will find the memcached source archive. 如果安装了这样的源rpm软件包,则会在/usr/src/packages/...下解压内容,在一个SOURCE文件夹中,您可以在其中找到内存缓存的源归档文件。 You must unpack that archive, apply the patch, archive the pached source and replace the archive under SOURCE . 您必须解压缩该归档文件,应用补丁,归档已打包的源文件并替换SOURCE下的归档文件。 Or (much more elegant) you add the patch to the spec file which controls the build process to generate a binary rpm package from the installed source rpm package. 或者(更优雅)将补丁添加到spec file ,该spec file控制构建过程以从已安装的源rpm软件包生成二进制rpm软件包。 You will find the spec file under SPECS , probably called memcached.spec or something. 您会在SPECS下找到spec file ,该spec file可能称为memcached.spec或其他名称。 Usually there are already some patches contained, so you have a starting point. 通常,已经包含一些补丁程序,因此您有一个起点。

If you have patched the source rpm package in one of the ways as described above you can build an own binary rpm package using the rpmbuild command, something like this: rpmbuild -bb SPECS/memcached.spec ... 如果以上述方法之一修补了源rpm软件包,则可以使用rpmbuild命令构建自己的二进制rpm软件包,如下所示: rpmbuild -bb SPECS/memcached.spec ...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM