1.在Fedora 12 上安裝套件
yum install autoconf automake gcc-c++ libX11-devel xorg-x11-proto-devel libXt-devel libXmu-devel
2.下載並安裝ns2 (一定要抓ns-allinone-2.34.tar.gz , ns-2.34會不能run)
http://www.isi.edu/nsnam/ns/ns-build.html
tar zxvf ns-allinone-2.34.tar.gz
cd ns-alinone-2.34
./install (等吧!約7~8分鐘好像,中間沒有錯誤訊息)
3.Fedora12 的/usr/X11R6/lib 改到 /usr/lib 底下了(請看這裡)
vi /root/.bashrc 新增下列
# LD_LIBRARY_PATH
OTCL_LIB=/home/winer406/Downloads/ns-allinone-2.34/otcl-1.13
NS2_LIB=/home/winer406/Downloads/ns-allinone-2.34/lib
X11_LIB=/usr/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB
# TCL_LIBRARY
TCL_LIB=/home/winer406/Downloads/ns-allinone-2.34/tcl8.4.18/library
export TCL_LIBRARY=$TCL_LIB
# PATH
PATH=$PATH:/home/winer406/Downloads/ns-allinone-2.34/bin:/home/winer406/Downloads/ns-allinone-2.34/tcl8.4.18/unix:/home/winer406/Downloads/ns-allinone-2.34/tk8.4.18/unix
4.重新登入root,run ns即可
參考這裡
沒有留言:
張貼留言