slackware13.37 下安装NS-2

简介:

今天终于把NS-2在slackware上安装成功了,把安装笔记记录一下。

首先下载ns-2的软件包:ns-allinone-2.34.tar.gz

将软件包转移到/opt目录下,如果下载到/home/tiger506下面

进入/opt目录,对软件包进行解压

进入解压后的目录

安装软件包

回车之后进行安装,会提示error现象

tools/ranvar.cc: in member function `virtual double gammarandomvariable::value()’:
tools/ranvar.cc:219:70: error: cannot call constructor `GammaRandomVariable::GammaRandomVariable
tools/ranvar.cc:219:70: error: for a function-style cast, remove the redundant
`::GaammaRandomVariable’
make: *** [tools/ranvar.o] Error 1
ns make failed

解决方法,vi 进入ranvar.cc

修改第219行,结果如下

保存后再次执行install文件,如果出现error,按照上面的方法进行修改。直至成功。

最后按照一下提示修改环境变量及设置变量。slackware修改变量,进入vi /etc/profile

Please put /opt/ns-allinone-2.34/bin:/opt/ns-allinone-2.34/tcl8.4.18/unix:/opt/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 /opt/ns-allinone-2.34/otcl-1.13, /opt/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 /opt/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.

修改完以后执行

然后执行ns

执行nam

安装完成,可以开始ns的探索了




本文转自 tiger506 51CTO博客,原文链接:http://blog.51cto.com/tiger506/586051,如需转载请自行联系原作者

目录
相关文章
|
3月前
|
网络协议 网络安全
sudo mount -t nfs server_ip:/path/to/shared_directory /mnt/local_directory命令的作用是什么?
sudo mount -t nfs server_ip:/path/to/shared_directory /mnt/local_directory命令的作用是什么?
48 1
|
7月前
|
JSON Java Linux
linux 命令使用总结:vim,nohup,find,df,du,sudo,netstat,ll,curl,lastlog
linux 命令使用总结:vim,nohup,find,df,du,sudo,netstat,ll,curl,lastlog
92 5
|
9月前
|
Linux
Linux 简单指令认识 pwd|mkdir|touch|ls
Linux 简单指令认识 pwd|mkdir|touch|ls
|
Linux 数据安全/隐私保护 Windows
初学[Linux]基础命令“touch, cat, more, cp, rm, vm“
初学[Linux]基础命令“touch, cat, more, cp, rm, vm“
147 1
|
SQL Linux Shell
linux(十)目录相关命令ll、pwd、cd(1)
Linux的常用基本命令,大概先了解下他目录相关的命令,linux的目录其实就是windows下的文件夹,文件夹,是windows系统引入的一个概念。这个大概了解一下。
74 0
|
SQL Linux Ruby
linux(十)目录相关命令ll、pwd、cd(2)
这里有两种情况需要做一下区分: 1):逗号相隔的字符串 ruby 复制代码
91 0
|
Apache
系统找不到指定的路径。 : AH02291: Cannot access directory ‘D:/xp.cn/www/wwwroot/admin/PhpTest_10006/log/‘ for e
系统找不到指定的路径。 : AH02291: Cannot access directory ‘D:/xp.cn/www/wwwroot/admin/PhpTest_10006/log/‘ for e
120 0
|
Linux 编译器 Shell
04_Linux基础-.&..-cat-tac-重定向-EOF-Shell-more-ps-less-head-tail-sed-grep-which-whereis-PATH-bash-usr-locate-find
cat-tac-重定向-EOF-Shell-more-ps-less-head-tail-sed-grep-which-whereis-PATH-bash-usr-locate-find
190 0
04_Linux基础-.&..-cat-tac-重定向-EOF-Shell-more-ps-less-head-tail-sed-grep-which-whereis-PATH-bash-usr-locate-find
|
存储 Oracle 关系型数据库
LINUX02_概述、文件系统详解、vim、cd、ls、mkdir、touch、rm、cp、less、tail、head、find、locate、打包或解压tar(四)
LINUX02_概述、文件系统详解、vim、cd、ls、mkdir、touch、rm、cp、less、tail、head、find、locate、打包或解压tar(四)
134 0
LINUX02_概述、文件系统详解、vim、cd、ls、mkdir、touch、rm、cp、less、tail、head、find、locate、打包或解压tar(四)
|
开发工具
LINUX02_概述、文件系统详解、vim、cd、ls、mkdir、touch、rm、cp、less、tail、head、find、locate、打包或解压tar(三)
LINUX02_概述、文件系统详解、vim、cd、ls、mkdir、touch、rm、cp、less、tail、head、find、locate、打包或解压tar(三)
142 0
LINUX02_概述、文件系统详解、vim、cd、ls、mkdir、touch、rm、cp、less、tail、head、find、locate、打包或解压tar(三)