安装时出现 NS3 错误

NS3 error while installing

我想安装 NS3,但在 ./build.py 期间出现错误:

Waf: Leaving directory `/home/user/NS3repo/ns-3-allinone/ns-3-dev/build'
Build failed
     -> task in 'ns3-wifi' failed (exit status 1):
     {task 140583796598928: cxx wifi-mac-queue.cc -> wifi-mac-queue.cc.1.o}
     ['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-std=c++11', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-fPIC', '-pthread', '-I.', '-I..', '-DNS3_BUILD_PROFILE_DEBUG', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_PACKET_H=1', '-DHAVE_IF_TUN_H=1', '-DHAVE_GSL=1', '-DHAVE_SQLITE3=1', '../src/wifi/model/wifi-mac-queue.cc', '-c', '-o', '/home/user/NS3repo/ns-3-allinone/ns-3-dev/build/src/wifi/model/wifi-mac-queue.cc.1.o']

完整日志:https://pastebin.com/tAkph7UR 我一直在学习本教程:https://gnu-linux.org/installation-of-ns3-on-ubuntu.html 我在最新的 macOS

上使用 Virtual Box 运行 Ubuntu 14.04

我已经按照本教程进行操作并且它正在运行:https://www.youtube.com/watch?v=1N3CMrfxbG4

问题可能与先决条件有关。我已经像视频中提到的那样安装了它们: sudo apt-get install gcc g++ python python-dev mercurial bzr gdb valgrind gsl-bin libgsl0-dev libgsl0ldbl flex bison tcpdump sqlite sqlite3 libsqlite3-dev libxml2 libxml2-dev libgtk2.0-0 libgtk2.0-dev uncrustify doxygen graphviz imagemagick texlive texlive-latex-extra texlive-generic-extra texlive-generic-recommended texinfo dia texlive texlive-latex-extra texlive-extra-utils texlive-generic-recommended texi2html python-pygraphviz python-kiwi python-pygoocanvas libgoocanvas-dev python-pygccxml

目前的ns-3-dev对gcc-4.9的最低要求,而Ubuntu14.04的默认gcc仍然是gcc-4.8,你可能需要更新你的gcc。查看 ns-3 installation guide for ubuntu 中的说明,了解将 gcc 从 4.8 升级到 4.9 的可能方法。