farwang 2009-12-23
本来打算在Windows7下安装cygwin,搭建类unix环境来运行ns2运行,cygwin安装顺利,已能看熟悉的$,看到ls,pwd,cp,rm在微软的cmd中飘荡,心中狂喜。但是ns的安装却不顺利,况且cygwin的运行出现了一次次不确定性,缓冲区不足,环境变量出问题。有时,仅一个tar命令,要运行多遍才能成功,间歇性故障总是伴随着大型系统的不稳定性发生(谁叫我导师是搞容错的,哎。。)。于是决定,回到Linux,发挥双系统的优势!
来到Ubuntu 9.10,马上着手进行ns2,安装:
1、首先是下载ns-allinone-2.33.tar.gz,地址为
http://cdnetworks-kr-2.dl.sourceforge.net/project/nsnam/allinone/ns-allinone-2.33/ns-allinone-2.33.tar.gz
下载完毕后,将其放在/home/yyang目录下,注意yyang为我的用户名,解压缩以待后面使用:
cd /home/yyang
tar xvfz ns-allinone-2.33.tar.gz
2、安装几个需要使用的软件包:
sudo apt-get install build-essential
sudo apt-get install tcl8.4 tcl8.4-dev tk8.4 tk8.4-dev
sudo apt-get install libxmu-dev
3、然后可以进行安装:
cd /home/yyang/ns-allinone-2.33.tar.gz
sudo ./install
然后看到命令行非常养眼地快速翻滚。在结束时突然报错:
ld -shared -o libotcl.so otcl.o
otcl.o: In function `OTclDispatch':
/home/yyang/ns-allinone-2.33/otcl-1.13/otcl.c:495: undefined reference to `__stack_chk_fail_local'
otcl.o: In function `Otcl_Init':
/home/yyang/ns-allinone-2.33/otcl-1.13/otcl.c:2284: undefined reference to `__stack_chk_fail_local'
ld: libotcl.so: hidden symbol `__stack_chk_fail_local' isn't defined
ld: final link failed: Nonrepresentable section on output
make: *** [libotcl.so] 错误 1
otcl-1.13 make failed! Exiting ...
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems