我一直在我的Ubuntu上使用ns2和nam 。 现在我必须应用补丁( OSPF )。 我一直在寻找如何在Linux中应用补丁(因为我是一种新的),我得到的只是:
1) $ tar xvf ns-allinone-2.35.tar.gz 2) $ cd ns-allinone-2.35/ 3) $ ln -s ns-2.35/ ns-2.34 ... Then the patch will work,except for one line. (commom/packet.h). 4) $ patch -p0 < 10-ospf4ns2.34-base.patch http://sourceforge.net/projects/ospf4ns/ 5) Replace commom/packet.h with the attached "packet.h" : Edited by hand. 6) export CC=gcc44 CXX=g++44 && ./install
我解开了tar文件,将.patch文件复制到名为10-ospf4ns2.34-base.patch的ns-allinone-2.35 10-ospf4ns2.34-base.patch ns-allinone-2.35文件夹中,转到terminal中的目录,使用ln -s ns-2.35/ ns-2.34和然后使用第4行进行修补。 之后,我有这些消息:
The next patch would create the file ns-2.34/classifier/classifier-mtopology.cc,which already exists! Assume -R? [n] y patching file ns-2.34/classifier/classifier-mtopology.cc The next patch would create the file ns-2.34/classifier/classifier-mtopology.h,which already exists! Assume -R? [n] y patching file ns-2.34/classifier/classifier-mtopology.h can't find file to patch at input line 92 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- ns-2.34.old/common/agent.cc 2009-06-14 18:35:45.000000000 +0100 |+++ ns-2.34/common/agent.cc 2010-02-26 23:34:33.161063590 +0000 -------------------------- File to patch:
在此之后,我不知道该怎么做。 我应该修补什么文件? ns-2.34没有classifier-mtopology.h 。 之后,我应该用指定的新packet.hreplace哪个packet.h ? 因为有几个common文件夹。 任何帮助将不胜感激,因为我是一个Linux新手。
如何发布Java程序的补丁
如何在Windows上应用由SVN制作的diff?
embedded式Linux – 部署固件更新的机制?
当使用Windows的Git的patch.exe时,“声明失败”
Windows的Linux补丁命令实用程序
diff与diff差异?
在使用二进制补丁时更新已安装的程序版本?
总是无法在远程Linux机器上应用SVN补丁
设置EXE VersionInfo
在什么样的条件下补丁不能适用?
看起来您已经在(至少部分)之前应用了该修补程序,并且您不在正确的目录中。
再次启动,也可以使用以下说明避免符号链接:
在一个新的目录中提取ns-allinone-2.35.tar.gz。
cd ns-allinone-2.35 / ns-2.35
应用补丁:
patch -p1 <10-ospf4ns2.34-base.patch
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。