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,如需转载请自行联系原作者

目录
相关文章
|
10月前
|
Linux
linux alias命令详解
linux alias命令详解
|
Ubuntu 编译器
powerpc-fsl-linux-gnuspe-ld.bfd: cannot find -lgcc
powerpc-fsl-linux-gnuspe-ld.bfd: cannot find -lgcc
149 0
powerpc-fsl-linux-gnuspe-ld.bfd: cannot find -lgcc
|
域名解析 网络协议 Linux
Linux Command dig 查询DNS
Linux Command dig 查询DNS
Linux Command who、whois、whoami
Linux Command who、whois、whoami
|
网络协议 Linux 开发工具
Linux - 修改Cent OS系统的的hostname、配置DNS映射
Linux - 修改Cent OS系统的的hostname、配置DNS映射目录 1 修改方式2 扩展: 配置DNS映射本篇文章中, 示例设计到的操作系统是CentOS 6.5. 1 修改方式① 命令hostname onepiece —— 运行后设置立即生效, 但要在打开新的会话窗口才能看到效果;...
2049 0
|
Web App开发 关系型数据库 Unix
|
Ubuntu Shell Linux
Linux遇到的问题(一)Ubuntu报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法
提示错误信息 www@iZ236j3sofdZ:~$ ifconfig Command 'ifconfig' is available in '/sbin/ifconfig' The command could not be located because '/sbin' is not included in the PATH environment variable.
1512 0