当前位置:网站首页>Installing ns-3 on ubuntu18.04
Installing ns-3 on ubuntu18.04
2020-11-06 01:28:56 【itread01】
[toc] I've installed it several times myself NS3 了 , The quality of other related blogs on the Internet is not very good , So I summed up a ns3 The installation process of . First go to the website https://www.nsnam.org/releases/ Download what you want to install NS-3 The original code of . Then use the following command to decompress : `tar xjf ns-allinone-3.26.tar.bz2`  #### First step : Deal with gcc/g++ edition ns3 You need to use gcc and g++ Compile , however Ubuntu18.04 The system preset gcc/g++ The version is usually in 7.X many , and ns3 Does not support too high version of gcc/g++, If not gcc/g++ If you're demoted , In compiling and installing ns3 When it comes to failure . You can order it first `gcc -v` Take a look at the current gcc/g++ edition . If it is high, execute the following command to lower gcc and g++ edition : ```bash # Install lower version gcc and g++ sudo apt-get install gcc-5 sudo apt-get install g++-5 # Enter /usr/bin Catalog cd /usr/bin # Back up first sudo mv gcc gcc.backup sudo mv g++ g++.backup # And then we download 5. Several versions of gcc and g++ Linking the past sudo ln -sf gcc-5 gcc sudo ln -sf g++-5 g++ # See if the downgrade was successful gcc -v ``` ** Be careful :**`sudo apt-get install gcc-5` If this order is written specifically gcc Version does not execute successfully on my system , But vaguely write a `gcc-5` You can execute it successfully , The command will automatically download a gcc-5.5.g++ Empathy . #### The second step : Install related dependencies In the formal compilation installation ns3 Before , You have to install a lot of dependent software first , Execute the following command to install the dependencies : ```bash sudo apt-get update sudo apt-get install gcc g++ python sudo apt-get install gcc g++ python python-dev sudo apt-get install mercurial sudo apt-get install bzr sudo apt-get install gdb valgrind sudo apt-get install gsl-bin libgsl-dev libgsl2 sudo apt-get install flex bison libfl-dev sudo apt-get install g++ gcc sudo apt-get install tcpdump sudo apt-get install sqlite sqlite3 libsqlite3-dev sudo apt-get install libxml2 libxml2-dev sudo apt-get install libgtk2.0-0 libgtk2.0-dev sudo apt-get install vtun lxc sudo apt-get install uncrustify sudo apt-get install doxygen graphviz imagemagick sudo apt-get install python-sphinx dia sudo apt-get install python-pygraphviz python-kiwi python-pygoocanvas libgoocanvas-dev sudo apt-get install libboost-signals-dev libboost-filesystem-dev sudo apt-get install openmpi* sudo apt-get install texlive texlive-extra-utils texlive-latex-extra ``` These commands can be copied into a script file and executed at one time , To avoid too much trouble to implement one by one . #### The third step : Officially install 1、 First into the catalog ns-allinone-3.26, Then execute the following command : ```bash cd ns-allinone-3.26 sudo ./build.py ``` 2、 Then go to the directory ns-3.26, Carry out orders ``` cd ns-3.26 sudo ./waf clean ``` 3、 In the catalog ns-3.26 Next , Execute the following command to complete the compilation and installation ``` sudo ./waf -d debug --enable-example --enable-tests configure sudo ./waf ``` As shown in the figure below , This indicates that the compilation is successful  #### Step four : Test stay ns-allinone-3.26/ns-3.26 Under the catalogue , Execute the following command , Test whether the installation is successful : ``` sudo ./waf --run hello-simulator ``` Output Hello Simulator Indicates that the installation is successful  So far ns3 Visual animation tools netanim Still can't use the State , It will be updated later netanim The installation process of . ** References :** https://www.jianshu.com/p/2c6c38ebe936 https://blog.csdn.net/wuzhiwuweisun/article/details/
版权声明
本文为[itread01]所创,转载请带上原文链接,感谢
边栏推荐
- C++ 数字、string和char*的转换
- C++学习——centos7上部署C++开发环境
- C++学习——一步步学会写Makefile
- C++学习——临时对象的产生与优化
- C++学习——对象的引用的用法
- C++编程经验(6):使用C++风格的类型转换
- Won the CKA + CKS certificate with the highest gold content in kubernetes in 31 days!
- C + + number, string and char * conversion
- C + + Learning -- capacity() and resize() in C + +
- C + + Learning -- about code performance optimization
猜你喜欢
-
C + + programming experience (6): using C + + style type conversion
-
Latest party and government work report ppt - Park ppt
-
在线身份证号码提取生日工具
-
Online ID number extraction birthday tool
-
️野指针?悬空指针?️ 一文带你搞懂!
-
Field pointer? Dangling pointer? This article will help you understand!
-
HCNA Routing&Switching之GVRP
-
GVRP of hcna Routing & Switching
-
Seq2Seq实现闲聊机器人
-
【闲聊机器人】seq2seq模型的原理
随机推荐
- LeetCode 91. 解码方法
- Seq2seq implements chat robot
- [chat robot] principle of seq2seq model
- Leetcode 91. Decoding method
- HCNA Routing&Switching之GVRP
- GVRP of hcna Routing & Switching
- HDU7016 Random Walk 2
- [Code+#1]Yazid 的新生舞会
- CF1548C The Three Little Pigs
- HDU7033 Typing Contest
- HDU7016 Random Walk 2
- [code + 1] Yazid's freshman ball
- CF1548C The Three Little Pigs
- HDU7033 Typing Contest
- Qt Creator 自动补齐变慢的解决
- HALCON 20.11:如何处理标定助手品质问题
- HALCON 20.11:标定助手使用注意事项
- Solution of QT creator's automatic replenishment slowing down
- Halcon 20.11: how to deal with the quality problem of calibration assistant
- Halcon 20.11: precautions for use of calibration assistant
- “十大科学技术问题”揭晓!|青年科学家50²论坛
- "Top ten scientific and technological issues" announced| Young scientists 50 ² forum
- 求反转链表
- Reverse linked list
- js的数据类型
- JS data type
- 记一次文件读写遇到的bug
- Remember the bug encountered in reading and writing a file
- 单例模式
- Singleton mode
- 在这个 N 多编程语言争霸的世界,C++ 究竟还有没有未来?
- In this world of N programming languages, is there a future for C + +?
- es6模板字符
- js Promise
- js 数组方法 回顾
- ES6 template characters
- js Promise
- JS array method review
- 【Golang】️走进 Go 语言️ 第一课 Hello World
- [golang] go into go language lesson 1 Hello World