如何在ubuntu10.04环境下安装ns-2.29+mih
来源:互联网 发布:法兰克编程入门 编辑:程序博客网 时间:2024/05/17 22:38
晤..每次都要摸索好久,还是记下来吧~~
NS2的这个MIH包包含的内容比较丰富,具体的内容参照以下两个网址:
http://www.nist.gov/itl/antd/emntg/ssm_seamlessandsecure.cfm
http://www.nist.gov/itl/antd/emntg/ssm_tools.cfm
下面开始安装
我的安装环境:
系统:Ubuntu10.04 LTS
GCC和G++版本:4.3.4
一、首先下载ns-allinone-2.29.tar.gz文件放到主目录下(我的是/home/wuxuguang)下,解压
tar -xvzf ns-allinone-2.29.tar.gz
然后将我之前安装ns-2.29+mih成功的ns-2.29文件夹复制到ns-allinone-2.29目录下覆盖解压出来的ns-2.29文件夹
二、进入到ns-allinone-2.29目录下执行./install命令
helloworld@ubuntu:~$ cd ns-allinone-2.29/helloworld@ubuntu:~/ns-allinone-2.29$ ./install
晤...报错:
============================================================
* Build tcl8.4.11
============================================================
loading cache ./config.cache
checking whether to use symlinks for manpages... no
checking whether to compress the manpages... no
checking whether to add a package name suffix for the manpages... no
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for building with threads... no (default)
checking if the compiler understands -pipe... yes
checking how to run the C preprocessor... gcc -pipe -E
checking for sin... no
checking for main in -lieee... yes
checking for main in -linet... no
checking for net/errno.h... no
checking for connect... yes
checking for gethostbyname... yes
checking how to build libraries... static
checking for ranlib... ranlib
checking if 64bit support is requested... no
checking if 64bit Sparc VIS support is requested... no
checking system version (for dynamic loading)... ./configure: 1: Syntax error: Unterminated quoted string
tcl8.3.2 configuration failed! Exiting ...
Tcl is not part of the ns project. Please see www.Scriptics.com
to see if they have a fix for your platform.
日志可以看出是在编译tcl8.4.11的过程中出错,百度一下,需要改以下几个地方:
helloworld@ubuntu:~/ns-allinone-2.29$ gedit tcl8.4.11/unix/configure tcl8.4.11/unix/tcl.m4
helloworld@ubuntu:~/ns-allinone-2.29$ gedit tk8.4.11/unix/configure tk8.4.11/unix/tcl.m
把以上文件中的.relid'`替换成.relid`,然后重新执行./install然后就会发现tcl8.4.11和tk8.4.11编译安装成功。
三、结果还是报错..NS安装成功,nam安装不成功
parser.h:97: error: extra qualification ‘ParseTable::’ on member ‘nam4wpan’parser.h:98: error: extra qualification ‘ParseTable::’ on member ‘wpan_bradius’In file included from netview.cc:51:node.h:226: error: extra qualification ‘Node::’ on member ‘getTclScriptLabel’node.h: In member function ‘virtual char* BoxNode::style()’:node.h:280: warning: deprecated conversion from string constant to ‘char*’node.h: In member function ‘virtual char* CircleNode::style()’:node.h:291: warning: deprecated conversion from string constant to ‘char*’node.h: In member function ‘virtual char* HexagonNode::style()’:node.h:302: warning: deprecated conversion from string constant to ‘char*’node.h: In member function ‘virtual char* VirtualNode::style()’:node.h:318: warning: deprecated conversion from string constant to ‘char*’make: *** [netview.o] 错误 1Nam make failed! Continue ...找到文件/home/helloworld/ns-allinone-2.29/nam-1.11/parser.h的第97行和第98行去掉ParseTable::
对于其他文件(/home/helloworld/ns-allinone-2.29/nam-1.11/node.h,/home/helloworld/ns-allinone-2.29/nam-1.11/netgraph.h)也是如此
而对于/home/helloworld/ns-allinone-2.29/nam-1.11/agent.h,则需要将第73行的NULL改成0
这些改完之后,nam就能够安装成功了
四、运行几个脚本试试
helloworld@ubuntu:~/ns-allinone-2.29$ ns ns-2.29/tcl/hsntg/multiFace1.tc
晤..弹出一堆调试信息...成功...
- 如何在ubuntu10.04环境下安装ns-2.29+mih
- 《转载》在ubuntu10.04下成功安装 ns-allinone-2.34
- Ubuntu10.04下安装ns-allinone-2.35
- 在ubuntu10.04环境下安装mkvtoonix
- ns-allinone-2.35在ubuntu14.04环境下的安装
- 如何在ubuntu10.04环境下编译android
- 如何在ubuntu10.04环境下编译android
- 如何在ubuntu10.04下搭建android的开发环境
- 在Ubuntu10.04环境下安装pci转串口驱动
- 在VMware虚拟环境下安装ubuntu10.04
- 在ubuntu10.10下安装Qt环境
- 在windows环境下ns-2.29版本安装后运行ns命令总有一个警告是怎么回事??
- Ubuntu10.04环境下安装JDK
- ubuntu10.04环境下安装tftp
- ns-2.29在Ubuntu8.04中的安装
- 在Ubuntu10.10下安装arm-linux交叉编译环境
- matlab在ubuntu10.04下的安装
- 在ubuntu10.04 下安装NS2
- 从程序员到项目经理(六):程序员加油站 -- 懂电脑更要懂人脑
- Eclipse与github整合完整版
- TCHAR和char 的相互转化
- 对日志的处理_log4j入门三
- SEO不再是拼技术而是来到拼运营的年代了
- 如何在ubuntu10.04环境下安装ns-2.29+mih
- Spring Security
- remote_message2
- 关于集群、负载均衡、分布式的区别(转)
- linux多线程数据冲突
- 关于java控制台输入
- calloc/ malloc
- VC SerialPort串口调试,报错: SerialPort comstat is being used without defining
- UDP端口传递接收数据