1、装NS2
下载ns-allinone-2.29.tar.gz
tar xzvf ns-allinone-2.29.tar.gz
(解压缩在home/sjm/中)
分别进入
ns-allinone-2.29/tcl8.4.11/unix/
ns-allinone-2.29/tcl8.4.11/tk8.4.11/unix/
ns-allinone-2.29/otcl-1.11/
然后 cp configure{,.orig} && sed "s/relid'/relid/" configure.orig > configure
(解决ns2-2.29和Ubuntu-6.06 bash的不兼容问题)
sudo apt-get install libxmu-devsudo apt-get install -f libxt-dev
sudo gedit home/sjm/ns-allinone-2.9/nam-1.11/agent.h
第73行,NULL改成0
cd ../..
sudo ./install
sudo gedit /etc/bash.bashrc
末尾添加
export PATH=$PATH:/home/sjm/ns-allinone-2.29/bin:/home/sjm/ns-allinone-2.29/tcl8.4.11/unix:/home/sjm/ns-allinone-2.29/tk8.4.11/unix
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/sjm/ns-allinone-2.29/otcl-1.11:/home/sjm/ns-allinone-2.29/lib
export TCL_LIBRARY=/home/sjm/ns-allinone-2.29/tcl8.4.11/library
(上面修改环境变量)
然后关闭终端,再重新打开
ns
得到%
搞定!
新闻热点
疑难解答