Install ndnSIM in Ubuntu 1 2.04

Source: Internet
Author: User

I finally installed ndnSim in Ubuntu 1 2.04 ~~ I encountered a lot of errors in the middle. Fortunately, I solved them one by one. I 'd like to share my experience with you ~~

1. NS3 Development Environment Settings

Sudo apt-get install gcc g ++ python-dev // C ++ and python installation, required
Sudo apt-get install mercurial // NS3 code maintenance source code version control management system distributed version control system
Sudo apt-get install bzr // run python to bind ns-3-dev requires the bazaar component
Sudo apt-get install libgtk2.0-0 libgtk2.0-dev // GTK-Based Configuration System
Sudo apt-get install gdb valgrind // debugging tool
Sudo apt-get install doxygen graphviz imagemagick // document Builder
// Doxygen installation error. Install directly:
Sudo git clone https://github.com/doxygen/doxygen.git
Cd doxygen
Sudo./configure
Sudo make
Sudo make install
Sudo apt-get install texlive-pdf texlive-latex-extra // document builder, which generates instructions from the source code
Sudo apt-get install texinfo dia texlive-extra-utils texi2html // ns-3 manual and tutorial write viewing tool
Sudo apt-get install flex bison // lexical analyzer and syntax analysis generator required for Simulation
Sudo apt-get install libgoocanvas-dev // This component is required for Visual Testing of simulation in some mobile scenarios.
Sudo apt-get install tcpdump // read pcap packet traces, that is, the packet sniffer
Sudo apt-get install sqlite sqlite3 libsqlite3-dev // database software supporting statistical features
Sudo apt-get install libxml2 // configuration storage software for xml
Sudo apt-get install python-pygraphviz python-kiwi python-pygoocanvas // Gustavo's ns-3-pyviz visualization software

Sudo apt-get install python-pygccxml
Sudo apt-get install qt4-qmake

2. NS3 ns-3-allinone Installation
Http://www.nsnam.org/download the latest NS3 ns-allinone-3.17.tar.bz2
Tar xjf ns-allinone-3.17.tar.bz2
Cd ns-allinone-3.17.tar.bz2
Sudo./build. py
Cd ns-3.17
Sudo./waf-d optimized configure
Sudo./waf-d debug -- enable-examples -- enable-tests configure // configure
Sudo./waf // use waf to build ns3

Test NS3
./Test. py-c core: 152 of 155 tests passed, 3 skipped, 0 failed, 0 crashed, 0 valgrind errors

Sudo./waf -- run hello-simulator: Hello Simulator


3. Install NDNSIM
Preparation: Reference http://ndnsim.net/faq.html#installing-boost-libraries

Other function libraries are used in boost. To use the corresponding functions in boost, you must first install libraries that may be missing in the system.

Apt-get install mpi-default-dev # install the mpi Library

Install libboost:
Wget http://downloads.sourceforge.net/project/boost/boost/1.53.0/boost_1_53_0.tar.bz2
Tar jxf boost_rj53_0.tar.bz2
Cd boost_000053_0
./Bootstrap. sh
Modify the tools/build/v2/user-config.jam file and add a line "using mpi;" at the end (note that there is a space after mpi and then a semicolon)
Sudo./b2 -- prefix =/usr/local install

Download ndn:
Cd/opt
Sudo mkdir ndnSIM
Cd ndnSIM
Sudo git clone git: // github.com/cawka/ns-3-dev-ndnSIM.git ns-3
Sudo git clone git: // github.com/cawka/pybindgen.git pybindgen
Sudo git clone git: // github.com/NDN-Routing/ndnSIM.git ns-3/src/ndnSIM

Install
Cd pybindgen
Sudo./waf configure
Sudo./waf
Cd./ns-3
Sudo./waf configure -- boost-supported des =/usr/local/include -- boost-libs =/usr/local/lib -- enable-examples
Sudo./waf

Test:
Sudo./waf -- run = ndn-simple
If libboost _ *. so.1.53.0: cannot open shared object fiel: No such file or directory appears
Then, the sudo cp/usr/local/lib/libboost _ * so.1.53.0/usr/lib problem is solved.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.