NS3安装

Posted zhengguiping--9876

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了NS3安装相关的知识,希望对你有一定的参考价值。

1、添加源
sudo vim /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu/ trusty main universe restricted multiverse
sudo apt-get update
2、编写脚本安装依赖包
vim pre.sh

#!/bin/sh
sudo apt-get install gcc g++ python python3 -y
sudo apt-get install gcc g++ python python3 python3-dev -y
sudo apt-get install python3-setuptools git mercurial -y
sudo apt-get install qt5-default mercurial -y
sudo apt-get install gir1.2-goocanvas-2.0 python-gi python-gi-cairo python-pygraphviz python3-gi python3-gi-cairo python3-pygraphviz gir1.2-gtk-3.0 ipython ipython3 -y
sudo apt-get install openmpi-bin openmpi-common openmpi-doc libopenmpi-dev -y
sudo apt-get install autoconf cvs bzr unrar -y
sudo apt-get install gdb valgrind -y
sudo apt-get install uncrustify -y
sudo apt-get install doxygen graphviz imagemagick -y
sudo apt-get install texlive texlive-extra-utils texlive-latex-extra texlive-font-utils texlive-lang-portuguese dvipng latexmk -y
sudo apt-get install python3-sphinx dia -y
sudo apt-get install gsl-bin libgsl-dev libgsl23 libgslcblas0 -y
sudo apt-get install tcpdump -y
sudo apt-get install sqlite sqlite3 libsqlite3-dev -y
sudo apt-get install libxml2 libxml2-dev -y
sudo apt-get install cmake libc6-dev libc6-dev-i386 libclang-dev llvm-dev automake -y
sudo apt-get install python-pip -y
pip install cxxfilt -y
sudo apt-get install libgtk2.0-0 libgtk2.0-dev -y
sudo apt-get install vtun lxc -y
sudo apt-get install libboost-signals-dev libboost-filesystem-dev -y
sudo apt-get install python-dev python-pygraphviz python-kiwi python-pygoocanvas python-gnome2 gir1.2-goocanvas-2.0 python-rsvg -y

保存脚本退出,获取root权限
chmod +x pre.sh
./pre.sh
3、下载ns3源码,解压
tar xjf ns-allinone-3.30.tar.bz2
4、配置(cd ns3.30)
./waf configure --build-profile=debug --enable-examples --enable-tests
5、编译
./waf
6、测试

./test.py -c core
7、运行
./waf --run scratch/scratch-simulator

以上是关于NS3安装的主要内容,如果未能解决你的问题,请参考以下文章

NS3和Aqua sim ng安装配置

ubuntu 10.04下ns2和ns3能同时安装吗

我在win7下用wubi装的ubuntu,配置NS3环境后,再开机状态栏图标啥的都没了,只有桌面背景了,求指教

NS3-00-学习资料

如何在 NS3 中使用 GMP?

Ubuntu18.04上安装NS-3