科研学术工具|quic-ns-3 安装配置过程【存档】

导师的一个研究和quic协议相关,让我安装这个仿真工具,整个过程花费了很多功夫,虚拟机都重装了好几次,分享一下过程步骤与出现问题。
参考链接 ns-3 教程 —— 入门
仿真工具NS3的基本知识
ns-3介绍与安装
官网
github 地址:https://github.com/signetlabdei/quic-ns-3
科研学术工具|quic-ns-3 安装配置过程【存档】
文章图片

src/quic 【科研学术工具|quic-ns-3 安装配置过程【存档】】链接https://github.com/signetlabdei/quic-ns-3/tree/master/src/quic
科研学术工具|quic-ns-3 安装配置过程【存档】
文章图片

要使用这个模块运行模拟,您需要安装ns-3,在src目录中克隆这个存储库,并修补internet模块的wscript文件。所需的依赖项包括git和构建环境。
安装依赖 参考ns-3维基,了解如何安装系统来安装ns-3。
https://www.nsnam.org/docs/release/3.33/tutorial/singlehtml/index.html
出现问题:
The following list of packages should be accurate for Ubuntu 19.04 release; other releases or other Debian-based systems may slightly vary. Ubuntu 16.04 LTS release is probably the oldest release that is known to work with recent ns-3 releases.
Note: As of ns-3.30 release (August 2019), ns-3 uses Python 3 by default, but earlier releases depend on Python 2 packages, and at least a Python 2 interpreter is recommended. If working with an earlier release, one may in general substitute ‘python’ for ‘python3’ in the below (e.g. install ‘python-dev’ instead of ‘python3-dev’).
系统安装的python3.5太低,要升级
https://www.jb51.net/article/182392.htm
https://blog.csdn.net/jiekexu/article/details/80294523
https://blog.csdn.net/tanmx219/article/details/86532759
依赖整理: 下面一大段是官网步骤里摘出来的,官网内容太多了,直接摘出来方便操作
minimal requirements for C++ users (release): This is the minimal set of packages needed to run ns-3 from a released tarball.

apt-get install g++5 gcc5 python3

minimal requirements for Python API users (release 3.30, 3.31, and ns-3-dev): This is the minimal set of packages needed to work with Python bindings from a released tarball.
apt-get install g++ python3 python3-dev pkg-config sqlite3

minimal requirements for Python (development): For use of ns-3-allinone repository (cloned from Git), additional packages are needed to fetch and successfully install pybindgen and netanim.
apt-get install python3-setuptools qt5-default mercurial

Netanim animator: qt5 development tools are needed for Netanim animator; qt4 will also work but we have migrated to qt5.
apt-get install qt5-default mercurial

Support for ns-3-pyviz visualizer
For ns-3.28 and earlier releases, PyViz is based on GTK+ 2, GooCanvas, and GraphViz:
apt-get install python-pygraphviz python-kiwi python-pygoocanvas libgoocanvas-dev ipython apt-get install python-dev python-pygraphviz python-kiwi python-pygoocanvas python-gnome2 python-gnome2-desktop-dev python-rsvg

For Ubuntu 18.04, python-pygoocanvas is no longer provided. The ns-3.29 release and later upgrades the support to GTK+ version 3, and requires these packages:
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

Support for MPI-based distributed emulation
apt-get install openmpi-bin openmpi-common openmpi-doc libopenmpi-dev autoconf cvs bzr unrar gdb valgrind uncrustify

Support for bake build tool:
apt-get install autoconf cvs bzr unrar gdb valgrind uncrustify

Debugging:
apt-get install gdb valgrind uncrustify

Support for utils/check-style.py code style check program
apt-get install uncrustify

Doxygen and related inline documentation:
apt-get install doxygen graphviz imagemagick apt-get install texlive texlive-extra-utils texlive-latex-extra texlive-font-utils dvipng latexmk

If you get an error such as ‘convert … not authorized source-temp/figures/lena-dual-stripe.eps’, see this post about editing ImageMagick’s security policy configuration: https://cromwell-intl.com/open-source/pdf-not-authorized.html. In brief, you will want to make this kind of change to ImageMagick security policy:
--- ImageMagick-6/policy.xml.bak 2020-04-28 21:10:08.564613444 -0700 +++ ImageMagick-6/policy.xml 2020-04-28 21:10:29.413438798 -0700 @@ -87,10 +87,10 @@- +- +

The ns-3 manual and tutorial are written in reStructuredText for Sphinx (doc/tutorial, doc/manual, doc/models), and figures typically in dia (also needs the texlive packages above):
apt-get install python3-sphinx dia apt-get install python-sphinx dia

Note: Sphinx version >= 1.12 required for ns-3.15. To check your version, type “sphinx-build”. To fetch this package alone, outside of the Ubuntu package system, try “sudo easy_install -U Sphinx”.
GNU Scientific Library (GSL) support for more accurate 802.11b WiFi error models (not needed for OFDM):
apt-get install gsl-bin libgsl-dev libgsl23 libgslcblas0 apt-get install gsl-bin libgsl-dev libgsl2

问题:无法定位软件包 libgsl23 libgslcblas0
If the above doesn’t work (doesn’t detect GSL on the system), consult: https://coral.ise.lehigh.edu/jild13/2016/07/11/hello/. But don’t worry if you are not using 802.11b models.
To read pcap packet traces
apt-get install tcpdump sqlite sqlite3 libsqlite3-dev libxml2 libxml2-dev

Database support for statistics framework
apt-get install sqlite sqlite3 libsqlite3-dev

Xml-based version of the config store (requires libxml2 >= version 2.7)
apt-get install libxml2 libxml2-dev

Support for generating modified python bindings
apt-get install libgtk-3-dev cmake libc6-dev libc6-dev-i386 libclang-6.0-dev llvm-6.0-dev automake apt-get install python3-pip python-pip python3 -m pip install --user cxxfilt

You are using pip version 8.1.1, however version 20.3.3 is available.
You should consider upgrading via the ‘pip install --upgrade pip’ command
and you will want to install castxml and pygccxml as per the instructions for python bindings (or through the bake build tool as described in the tutorial). The ‘castxml’ package provided by Ubuntu 18.04 and earlier is not recommended; a source build (coordinated via bake) is recommended.
Note: Ubuntu versions (through 19.04) and systems based on it (e.g. Linux Mint 18) default to an old version of clang and llvm (3.8), when simply ‘libclang-dev’ and ‘llvm-dev’ are specified. The packaging on these 3.8 versions is broken. Users of Ubuntu will want to explicitly install a newer version by specifying ‘libclang-6.0-dev’ and ‘llvm-6.0-dev’. Other versions newer than 6.0 may work (not tested).
A GTK-based configuration system
apt-get install libgtk-3-dev vtun lxc uml-utilities libboost-signals-dev libboost-filesystem-dev

To experiment with virtual machines and ns-3
apt-get install vtun lxc uml-utilities

Support for openflow module (requires some boost libraries)
apt-get install libboost-signals-dev libboost-filesystem-dev

下载 克隆主要的ns-3存储库:
git clone https://gitlab.com/nsnam/ns-3-dev ns-3-dev
cd ns-3-dev/src
克隆quic模块:
git clone https://github.com/signetlabdei/quic quic
编辑internet模块的wscript文件并添加头文件到headers.source列表
‘model/ipv4-end-point.h’,
‘model/ipv4-end-point-demux.h’,
‘model/ipv6-end-point.h’,
‘model/ipv6-end-point-demux.h’,
科研学术工具|quic-ns-3 安装配置过程【存档】
文章图片

编译 在ns-3-dev文件夹中配置和构建ns-3:
./waf clean ./waf configure --enable-tests --enable-examples ./waf buildsudo ./waf --run hello-simulator

bash: ./configure: 权限不够
给文件加上可执行权限: chmod +x configure
再输入 ./configure 就可以了;
如果用Python
./waf configure --enable-tests --enable-examples --disable-python ./waf build

pybindgen not found
pybindgen 版本不匹配问题
pybindgen 0.21.0.post15+nga587377
解决:版本为最新版 将文件夹放在最新版ns-3里面再编译
build失败 失败提示
科研学术工具|quic-ns-3 安装配置过程【存档】
文章图片

科研学术工具|quic-ns-3 安装配置过程【存档】
文章图片

相关链接
undefined reference to错误的解决方法
libevent 编译错误问题
glib ./.libs/libgio-2.0.so: undefined reference to `inflateGetHeader’错误解决
undefined reference to" 问题汇总及解决方法
解决gedit: symbol lookup error: /home/xxx/libgobject-2.0.so.0: undefined symbol: g_date_copy问题
多个库文件链接顺序问题”及“定义与实现不一致
科研学术工具|quic-ns-3 安装配置过程【存档】
文章图片

build成功 科研学术工具|quic-ns-3 安装配置过程【存档】
文章图片

build成功参考
https://www.cnblogs.com/variablex/p/13928867.html
https://blog.csdn.net/mary19920410/article/details/70339648
https://blog.csdn.net/wuzhiwuweisun/article/details/79483178
https://www.cnblogs.com/lxjshuju/p/7352334.html
模块问题待解决:
科研学术工具|quic-ns-3 安装配置过程【存档】
文章图片

科研学术工具|quic-ns-3 安装配置过程【存档】
文章图片

科研学术工具|quic-ns-3 安装配置过程【存档】
文章图片

build记录 记录整理:
quic-ns-3 pybingen模块缺失
ns-allinone-3.27 和quic模块不兼容
quic-ns-3 build成功但是visualizer不可以
ns-3-dev 在vb visualizer不可以缺失Missing python modules: gtk, goocanvas, pygraphviz
在vm visualizer可以 build失败(task in pybingen
ns-allinone-3.27
在vm里面visualizer可以 但是在vb visualizer不可以缺失Missing python modules: gtk, goocanvas, pygraphviz
科研学术工具|quic-ns-3 安装配置过程【存档】
文章图片

    推荐阅读