当前位置: 首页 > 工具软件 > allinone > 使用案例 >

Ubuntu下安装ns-allinone-2.34

夏侯浩气
2023-12-01

ubuntu下面安装ns-allinone-2.34步骤
第一步:安装必要的组件和包
apt-get install build-essential
apt-get install tcl8.4 tcl8.4-dev tk8.4 tk8.4-dev gcc-4.3
apt-get install libxmu-dev libxmu-headers

第二部:修改一处Bug
位置 ~/ns-allinone-2.34/otcl-1.13/
Edit file ' Makefile.in ' 7th line
From : CC = @CC@
 To : CC = gcc-4.3
 Else an error will occur when installation:
 otcl-1.13 make failed! Exiting

第三步:安装
进入 the ns-allinone-2.34 路径
cd ns-allinone-2.34
 Type in:./install
 Wait until the installation complete

安装完成之后的提示,请注意路径
----------------------------------------------------------------------------------------------------------------------------
*Please put /home/ns/ns-allinone-2.34/bin:/home/ns/ns-allinone-2.34/tcl8.4.18/unix:/home/ns/ns-allinone-2.34/tk8.4.18/unix -
*into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph.                      -
*
*IMPORTANT NOTICES:
*
-(1) You MUST put /home/ns/ns-allinone-2.34/otcl-1.13, /home/ns/ns-allinone-2.34/lib,
-   into your LD_LIBRARY_PATH environment variable.
-    If it complains about X libraries, add path to your X libraries
-    into LD_LIBRARY_PATH.
-    If you are using csh, you can set it like:
-        setenv LD_LIBRARY_PATH <paths>
-    If you are using sh, you can set it like:
-        export LD_LIBRARY_PATH=<paths>
-
-(2) You MUST put /home/ns/ns-allinone-2.34/tcl8.4.18/library into your TCL_LIBRARY environmental
-    variable. Otherwise ns/nam will complain during startup.
-
-
-After these steps, you can now run the ns validation suite with
-cd ns-2.34; ./validate

-For trouble shooting, please first read ns problems page
-http://www.isi.edu/nsnam/ns/ns-problems.html. Also search the ns mailing list archive
-for related posts.
---------------------------------------------------------------------------------------------------------------------------
用户名下路径下的环境变量配置

创建.bashrc

PATH="$PATH:/home/ns/ns-allinone-2.34/bin:/home/ns/ns-allinone-2.34/tcl8.4.18/unix:/home/ns/ns-allinone-2.34/tk8.4.18/unix"

LD_LIBRARY_PATH="/home/ns/ns-allinone-2.34/otcl-1.13:/home/ns/ns-allinone-2.34/lib"

TCL_LIBRARY="$TCL_LIBRARY://home/ns/ns-allinone-2.34/tcl8.4.18/library"

第四步:验证重新启动终端
After these steps, you can now run the ns validation suite with
-cd ns-2.34; ./validate

或者输入 ns 显示 %
       nam  出现nam播放器
-----------------------------------------------------------------------------------------------------------------------------


 类似资料: