注册 登录
编程论坛 Ubuntu

求助,Ubuntu如何配置NS2仿真

Link2Points 发布于 2020-09-16 20:36, 1824 次点击
求助,需要能快速便捷的方法配置ns2仿真的教程。

ns2-allinone-2.35.tar.gz包已下好了,但是解压后./install报错
只有本站会员才能查看附件,请 登录


输入sudo apt-get install build-essential autoconf automake libxmu-dev获取NS2安装依赖的包,然后下了一个下午才11%
只有本站会员才能查看附件,请 登录


求助,需要能快速便捷的方法或配置教程。心累。
3 回复
#2
apull2020-09-17 00:26
换个源,更改/etc/apt/sources.list文件

deb https://mirrors.ustc. bionic main restricted universe multiverse
deb https://mirrors.ustc. bionic-updates main restricted universe multiverse
deb https://mirrors.ustc. bionic-backports main restricted universe multiverse
deb https://mirrors.ustc. bionic-security main restricted universe multiverse
deb https://mirrors.ustc. bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc. bionic main restricted universe multiverse
deb-src https://mirrors.ustc. bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc. bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc. bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc. bionic-proposed main restricted universe multiverse
#3
Link2Points2020-09-17 10:15
回复 2楼 apull
感谢
#4
Link2Points2020-09-17 11:07
整理了下安装配置ns2的过程:

1、在https://下载解压ns2-allinone-2.35.tar.gz,如果觉得文件名太长,替换文件名mv ns2-allinone-2.35 ns
2、cd ns先修改gedit ns-2.35/linkstate/ls.h 中的 void eraseAll() { erase(baseMap::begin(), baseMap::end()); } 改为 void eraseAll() { this->erase(baseMap::begin(), baseMap::end()); }
3、根据二楼版主的方法修改源
    阿里源
deb http://mirrors. bionic main restricted universe multiverse
deb http://mirrors. bionic-security main restricted universe multiverse
deb http://mirrors. bionic-updates main restricted universe multiverse
deb http://mirrors. bionic-proposed main restricted universe multiverse
deb http://mirrors. bionic-backports main restricted universe multiverse
deb-src http://mirrors. bionic main restricted universe multiverse
deb-src http://mirrors. bionic-security main restricted universe multiverse
deb-src http://mirrors. bionic-updates main restricted universe multiverse
deb-src http://mirrors. bionic-proposed main restricted universe multiverse
deb-src http://mirrors. bionic-backports main restricted universe multiverse
    清华源
deb https://mirrors.tuna.tsinghua. bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua. bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua. bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua. bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua. bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua. bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua. bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua. bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua. bionic-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua. bionic-proposed main restricted universe multiverse
    然后更新
sudo apt-get update
sudo apt-get upgrade
4、sudo apt-get install build-essential autoconf automake libxmu-dev获取NS2安装依赖的包
5、./install安装
6、配置环境
gedit ~/.bashrc
根据文件所属路径配置
source ~/.bashrc
7、输入ns验证
如果是%则成功
如果显示如图
只有本站会员才能查看附件,请 登录

输入apt-get install ns2回车,输入y回车
然后再输入ns验证
只有本站会员才能查看附件,请 登录

成功,泪目
1