參考網站: http://www.anand-iyer.com/blog/?p=22
這個網站的設定動作,是我找到最簡單的~~
操作動作如下:
I spent a reasonably long time getting NS-2 (ns-allinone-2.34) to work in Ubuntu 10.04. Here’s how I finally did it:
1. Install necessary tools for building:
sudo apt-get install build-essential autoconf automake libxmu-dev gcc-4.3
2. It turns out that otcl does not like the version of gcc installed by default in Lucid. So go ahead and change ns-allinone-2.34/otcl-1.13/Makefile.in. Find the line that says:
CC= @CC@
and change it to:
CC= gcc-4.3
3. Now try doing ‘./install’ from the ns-allinone-2.34 directory. It should work.
以上動作完成後,使用 gedit ~/.bashrc ,將底下的內容貼到最下方,記得將 /opt/ 修改 為你解開 ns-allinone 的路徑。
export PATH=$PATH:/opt/ns-allinone-2.34/bin:/opt/ns-allinone-2.34/tcl8.4.18/unix:/opt/ns-allinone-2.34/tk8.4.18/unix
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ns-allinone-2.34/otcl-1.13:/opt/ns-allinone-2.34/lib
export TCL_LIBRARY=$TCL_LIBRARY:/opt/ns-allinone-2.34/tcl8.4.18/library
重新登入系統後,執行 ns 就會跳出 % 提示字元,應該就表示可以正常使用囉~~
1 則留言:
謝啦! 幫助很大
張貼留言