注:系统为Ubuntu 20.04,安装ns-allinone-3.30.1。
1、C++和python3安装与卸载
安装:sudo apt-get install g++ python3
卸载:sudo apt autoremove
2、安装sqlite3和sqlite3-doc
sudo apt-get install python3-dev pkg-config sqlite3
建议安装:
sudo apt-get install python3-dev pkg-config sqlite3-doc
3、安装Python3-setuptools和git
sudo apt-get install python3-setuptools git mercurial
4、安装qt5-default和mercurial
sudo apt-get install qt5-default mercurial
5、安装ns-3-pyviz可视化工具的依赖
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
出现这样的问题,但对后面的安装没啥影响,所以可以先继续安装,后面出问题了再解决。
6、安装基于MPI分布式仿真的依赖
sudo apt-get install openmpi-bin openmpi-common openmpi-doc libopenmpi-dev
建议安装:
autoconf-archive gnu-standards autoconf-doc gettext gcc-8-locales
gcc-8-multilib gcc-8-doc gfortran-multilib gfortran-doc gfortran-8-multilib
gfortran-8-doc gfortran-9-multilib gfortran-9-doc libhwloc-contrib-plugins
libtool-doc gcj-jdk m4-doc opencl-icd
7、安装bake构建工具的依赖
sudo apt-get install autoconf cvs bzr unrar
建议安装:
brz-doc python3-breezy.tests mksh rcs python3-breezy-dbg python3-kerberos
python3-paramiko python-configobj-doc python-gitlab-doc
8、安装调试
sudo apt-get install gdb valgrind
建议安装:
valgrind-dbg valgrind-mpi kcachegrind alleyoop valkyrie
9、安装uncrustify(第10步utils / check-style.py代码样式检查程序的依赖)
sudo apt-get install uncrustify
10、Doxygen和相关的在线文档
1、sudo apt-get install doxygen graphviz imagemagick
建议安装:
doxygen-latex doxygen-doc doxygen-gui graphviz-doc imagemagick-doc autotrace
curl enscript ffmpeg gimp gnuplot grads hp2xx html2ps libwmf-bin mplayer
povray radiance texlive-base-bin transfig ufraw-batch libfftw3-bin
libfftw3-dev inkscape libjxr-tools xapian-tools
2、sudo apt-get install texlive texlive-extra-utils texlive-latex-extra texlive-font-utils dvipng latexmk
建议安装:
apache2 | lighttpd | httpd libavalon-framework-java
libcommons-logging-java-doc libexcalibur-logkit-java liblog4j1.2-java
libdbd-csv-perl liblog-dispatch-filerotate-perl librrds-perl libxml-dom-perl
libencode-hanextra-perl libpod2-base-perl default-mta | mail-transport-agent
libmojolicious-perl libscalar-number-perl libtest-fatal-perl ri ruby-dev
bundler tcl-tclreadline debhelper perl-tk xzdec chktex dvidvi fragmaster
lacheck latexdiff purifyeps xindy lcdf-typetools psutils
texlive-fonts-recommended-doc texlive-latex-base-doc python3-pygments
icc-profiles libspreadsheet-parseexcel-perl texlive-latex-extra-doc
texlive-latex-recommended-doc texlive-luatex texlive-pstricks dot2tex prerex
ruby-tcltk | libtcltk-ruby texlive-pictures-doc vprerex default-jre-headless
11、安装图形编写的依赖
sudo apt-get install python3-sphinx dia
建议安装:
make-doc docutils-doc fonts-linuxlibertine | ttf-linux-libertine
texlive-lang-french python-jinja2-doc python-pygments-doc ttf-bitstream-vera
python-pyparsing-doc libjs-mathjax python3-sphinx-rtd-theme python3-stemmer
sphinx-doc
12、GNU科学库(GSL)支持更精确的802.11b WiFi错误模型
sudo apt-get install gsl-bin libgsl-dev libgsl23 libgslcblas0
建议安装:
gsl-ref-psdoc | gsl-doc-pdf | gsl-doc-info | gsl-ref-html
13、读取pcap数据包跟踪
sudo apt-get install tcpdump
14、数据库对统计框架的支持
sudo apt-get install sqlite sqlite3 libsqlite3-dev
建议安装:
sqlite-doc
15、配置基于XML的存储版本(需要libxml2> =版本2.7)
sudo apt-get install libxml2 libxml2-dev
建议安装:
icu-doc
16、支持生成修改后的python绑定
1、sudo apt-get install cmake libc6-dev libc6-dev-i386 libclang-6.0-dev llvm-6.0-dev automake python3-pip
建议安装:
cmake-doc ninja-build debian-keyring ncurses-doc
2、python3 -m pip install --user cxxfilt
17、基于GTK的配置系统
sudo apt-get install libgtk-3-dev
建议安装:
libcairo2-doc libdatrie-doc freetype2-doc libgirepository1.0-dev
libglib2.0-doc libxml2-utils libgraphite2-utils libgtk-3-doc libice-doc
libpango1.0-doc libsm-doc libthai-doc libwayland-doc
18、试验虚拟机和ns-3
sudo apt-get install vtun lxc uml-utilities
建议安装:
ifupdown btrfs-tools lvm2 lxc-templates lxctl user-mode-linux
19、支持openflow模块
sudo apt-get install libboost-filesystem-dev
建议安装:
libboost1.71-doc libboost-atomic1.71-dev libboost-chrono1.71-dev
libboost-container1.71-dev libboost-context1.71-dev
libboost-contract1.71-dev libboost-coroutine1.71-dev
libboost-date-time1.71-dev libboost-exception1.71-dev libboost-fiber1.71-dev
libboost-graph1.71-dev libboost-graph-parallel1.71-dev
libboost-iostreams1.71-dev libboost-locale1.71-dev libboost-log1.71-dev
libboost-math1.71-dev libboost-mpi1.71-dev libboost-mpi-python1.71-dev
libboost-numpy1.71-dev libboost-program-options1.71-dev
libboost-python1.71-dev libboost-random1.71-dev libboost-regex1.71-dev
libboost-serialization1.71-dev libboost-stacktrace1.71-dev
libboost-test1.71-dev libboost-thread1.71-dev libboost-timer1.71-dev
libboost-type-erasure1.71-dev libboost-wave1.71-dev libboost1.71-tools-dev
libmpfrc++-dev libntl-dev
整个安装主要参考:https://blog.csdn.net/qq_43005180/article/details/106951199,https://blog.csdn.net/weixin_44852935/article/details/107370577,http://skypacer210.github.io/2014/12/26/building-ns-3-on-ubuntu/,同时记录了安装过程中遇到的问题以及建议安装内容。