Installation Of NS2 (ns-2.35) In Ubuntu 20.04 - Engineering Clinic

Skip to main content

Installation of NS2 (ns-2.35) in Ubuntu 20.04

Installation of NS2 (ns-2.35) in Ubuntu 20.04 LTSStep 1: Install the basic libraries like$] sudo apt install build-essential autoconf automake libxmu-devStep 2: install gcc-4.8 and g++-4.8open the file using sudo mode$] sudo nano /etc/apt/sources.listInclude the following linedeb http://in.archive.ubuntu.com/ubuntu bionic main universe$] sudo apt update$] sudo apt install gcc-4.8 g++-4.8Step 3: Unzip the ns2 packages to home folder$] tar zxvf ns-allinone-2.35.tar.gz$] cd ns-allinone-2.35/ns-2.35Modify the following make files.~ns-2.35/Makefile.inChange @CC@ to gcc-4.8change @CXX@ to g++-4.8~nam-1.15/Makefile.in~xgraph-12.2/Makefile.in~otcl-1.14/Makefile.inChange in all places @CC@ to gcc-4.8@CPP@ or @CXX@ to g++-4.8open the file:~ns-2.35/linkstate/ls.hChange at the Line no 137 void eraseAll() { erase(baseMap::begin(), baseMap::end()); }to Thisvoid eraseAll() { this->erase(baseMap::begin(), baseMap::end()); }All changes madeStep 4: Open a new terminal$] cd ns-allinone-2.35/$] ./installStep 5 - Set the PATHOpen a new Terminal, $] gedit .bashrc Paste the following linesexport PATH=$PATH:/home/<yourusername>/ns-allinone-2.35/bin:/home/<yourusername>/ns-allinone-2.35/tcl8.5.10/unix:/home/<yourusername>/ns-allinone-2.35/tk8.5.10/unixexport LD_LIBRARY_PATH=/home/<yourusername>/ns-allinone-2.35/otcl-1.14:/home/<yourusername>/ns-allinone-2.35/libLogout and Login backOR$] source .bashrcThanks for watching, Subscribe and Share it to your friends... Share

Labels

Share

Comments

  1. UnknownJune 10, 2020 at 1:40 AM

    Hello Eng., I seen your video about wireless network and its very clear and very good. But, I ask you if you have a mobile recovery TCL code help me to implement an algorithm by Ns2. Thank you for help in advance.

    ReplyDeleteReplies
    1. T S Pradeep KumarAugust 6, 2020 at 6:05 PM

      Thsank you..

      DeleteReplies
        Reply
    2. Reply
  2. UnknownJune 17, 2020 at 10:54 AM

    Sir please help me. I am installing to xgraph but getting a problem again and again like this zac@zac-OptiPlex-9010:~/ns2/ns-allinone-2.35/xgraph-12.2$ sudo apt-get install xgraphReading package lists... DoneBuilding dependency tree Reading state information... DoneE: Unable to locate package xgraph.How to solve this? Please give me your valuable solution.

    ReplyDeleteReplies
      Reply
  3. ChethanJuly 29, 2020 at 12:40 PM

    how do i install xgraph sir, you mentioned about there is a video about install xgraph in your youtube library but i could not find any. Kindly help

    ReplyDeleteReplies
    1. T S Pradeep KumarAugust 6, 2020 at 6:05 PM

      Please find the video here. https://www.youtube.com/watch?v=G2pIxQOTdos

      DeleteReplies
        Reply
    2. UnknownJune 9, 2021 at 8:35 PM

      sir

      DeleteReplies
        Reply
    3. UnknownJune 9, 2021 at 8:36 PM

      i have contacted you through mail regarding project. can you plz reply

      DeleteReplies
        Reply
    4. Reply
  4. UnknownSeptember 23, 2020 at 1:48 PM

    Hello Sir...I have completed step2 successfully and i got a message like g++-4.8 is already the newest version (4.8.5-4ubuntu8).gcc-4.8 is already the newest version (4.8.5-4ubuntu8).The following packages were automatically installed and are no longer required: linux-headers-5.4.0-42 linux-headers-5.4.0-42-generic linux-image-5.4.0-42-generic linux-modules-5.4.0-42-generic linux-modules-extra-5.4.0-42-genericUse 'sudo apt autoremove' to remove them.0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.But if I use gcc- command to check whether gcc-4.8 is installed or not, it is showing like ommand 'gcc-' not found, did you mean: command 'gcc-8' from deb gcc-8 (8.4.0-3ubuntu2) command 'gcc-9' from deb gcc-9 (9.3.0-10ubuntu2) command 'gcc' from deb gcc (4:9.3.0-1ubuntu2) command 'gcc-7' from deb gcc-7 (7.5.0-6ubuntu2)Try: sudo apt install I am Stuck in this step please help me out.Thanks in advance

    ReplyDeleteReplies
    1. UnknownApril 4, 2021 at 12:41 PM

      I faced the same problem check using the command "gcc-4.8 --version" and also grep using command 'dpkg -l|grep gcc' and you should be able to find it . hope this helps

      DeleteReplies
        Reply
    2. UnknownAugust 7, 2021 at 1:08 PM

      please do the following steps$] sudo nano /etc/apt/sources.listInclude the following linedeb http://in.archive.ubuntu.com/ubuntu bionic main universe$] sudo apt update$] sudo apt install gcc-4.8 g++-4.8for NS2.35 you can use gcc and g++ version up to 5.4if 4.8 isn't working try installing gcc-5 and g++5. then at the step where you modify the Makefile.in , use gcc-5 instead of gcc-4.8 and so on

      DeleteReplies
        Reply
    3. Shashank JainMay 8, 2022 at 11:31 PM

      u dont have to press enter... just enter "gcc-" and press "tab" button on keyboard... U will get all the options

      DeleteReplies
        Reply
    4. Reply
  5. UnknownJanuary 28, 2021 at 2:01 PM

    https://unix.stackexchange.com/questions/224716/perl-library-getopts-plTry this for those who are getting some weird Can't locate getopts.pl error

    ReplyDeleteReplies
      Reply
  6. abdullahAugust 5, 2021 at 2:58 AM

    May I get ECC on NS2 simulation?

    ReplyDeleteReplies
      Reply
  7. UnknownJanuary 10, 2022 at 1:29 PM

    im getting error on the first step sudo apt install build-essential autoconf automake libxmu-devit says unable to locate package build-essential

    ReplyDeleteReplies
      Reply
  8. UnknownFebruary 15, 2022 at 12:32 PM

    Hello sir After doing step 4 installation I got this dire tory not found can u help me to solve this

    ReplyDeleteReplies
      Reply
  9. E=N(MASS)2February 23, 2022 at 6:21 PM

    Sir I installed gcc-4.8 and g++-4.8 successfullyExtracted ns-2.34Changes made in Makefile.in of otcl, nam, xgraph.But while doing listsource/ls.hAnd changing line 137 And installing it is showing make: ***[Makefile:94: mdart/mdart_adp.o] error 1Sir please help me out I stocked at this step.

    ReplyDeleteReplies
      Reply
  10. AnonymousNovember 10, 2022 at 1:53 PM

    hello sir,I want to run NS2 in Ubuntu 22.04. I follow all the steps that you were mentioned above. There were no error while installingNS2. The NS2 command is run properly, but when i run nam it will show the error :- "nam: error while loading shared libraries: libXext.so.6: cannot open shared object file: No such file or directory"

    ReplyDeleteReplies
      Reply
  11. AnonymousJanuary 24, 2023 at 1:57 PM

    After doing all things properly , starting ./install in nsallinone 2.35 directory.....Getting error of tcl can't be installed makefile error.....Could you please help me out....I am doing everything right but not able to install trying it from 2 days...

    ReplyDeleteReplies
      Reply
  12. AnonymousDecember 17, 2023 at 1:39 PM

    Command 'ns' not found, but can be installed with:sudo apt install ns2I followed the steps carefully but when I checked by command the terminal reply me [install by----- sudo apt get ns2] but nam is working here ....but when I run sudo apt get install ns2 then it shows working by checking ns & enter in the terminal...... here I am confused that from where the DSR protocol is working unzipped installed or by command installed ns2 ....I want to modify the DSR protocol ... where I can implement my modification?

    ReplyDeleteReplies
      Reply
Add commentLoad more...

Post a Comment

Popular posts from this blog

Installing ns3 in Ubuntu 22.04 | Complete Instructions

In this post, we are going to see how to install ns-3.36.1 in Ubuntu 22.04. You can follow the video for complete details Tools used in this simulation: NS3 version ns-3.36.1  OS Used: Ubuntu 22.04 LTS Installation of NS3 (ns-3.36.1) There are some changes in the ns3 installation procedure and the dependencies. So open a terminal and issue the following commands Step 1:  Prerequisites $ sudo apt update In the following packages, all the required dependencies are taken care and you can install all these packages for the complete use of ns3. $ sudo apt install g++ python3 python3-dev pkg-config sqlite3 cmake python3-setuptools git qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools gir1.2-goocanvas-2.0 python3-gi python3-gi-cairo python3-pygraphviz gir1.2-gtk-3.0 ipython3 openmpi-bin openmpi-common openmpi-doc libopenmpi-dev autoconf cvs bzr unrar gsl-bin libgsl-dev libgslcblas0 wireshark tcpdump sqlite sqlite3 libsqlite3-dev  libxml2 libxml2-dev libc6-dev libc6-dev-i386 libc... Share Read more

Installation of NS2 in Ubuntu 22.04 | NS2 Tutorial 2

NS-2.35 installation in Ubuntu 22.04 This post shows how to install ns-2.35 in Ubuntu 22.04 Operating System Since ns-2.35 is too old, it needs the following packages gcc-4.8 g++-4.8 gawk and some more libraries Follow the video for more instructions So, here are the steps to install this software: To download and extract the ns2 software Download the software from the following link http://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.35/ns-allinone-2.35.tar.gz/download Extract it to home folder and in my case its /home/pradeepkumar (I recommend to install it under your home folder) $ tar zxvf ns-allinone-2.35.tar.gz or Right click over the file and click extract here and select the home folder. $ sudo apt update $ sudo apt install build-essential autoconf automake libxmu-dev gawk To install gcc-4.8 and g++-4.8 $ sudo gedit /etc/apt/sources.list make an entry in the above file deb http://in.archive.ubuntu.com/ubuntu/ bionic main universe $ sudo apt update Since, it... Share Read more

About Me

My photo T S Pradeep Kumar Visit profile

Blog Archive

  • Dec 20252
  • Aug 20252
  • Jul 202512
  • Jun 20253
  • May 20253
  • Apr 20252
  • Mar 20252
  • Feb 20251
  • Jan 20252
  • Nov 20241
  • Sep 20243
  • Aug 20245
  • Jul 20242
  • Jun 20242
  • Mar 20241
  • Jan 20242
  • Dec 20231
  • Nov 20231
  • Oct 20233
  • Aug 20231
  • Jul 20232
  • Apr 20231
  • Feb 20232
  • Jan 20232
  • Dec 20221
  • Nov 20221
  • Sep 20221
  • Jun 20221
  • Apr 20221
  • Nov 20211
  • Oct 20217
  • Jul 20213
  • May 20212
  • Apr 20212
  • Mar 20211
  • Jan 20211
  • Dec 20201
  • Nov 20203
  • Sep 20201
  • Aug 20201
  • Jul 20201
  • Jun 202016
  • May 20203
  • Mar 20202
  • Feb 20201
  • Jan 20202
  • Nov 20193
  • Aug 20191
  • Jul 20191
  • Jun 20191
  • May 20191
  • Mar 20191
  • Jan 20195
  • Dec 20181
  • Nov 20181
  • Sep 20181
  • Aug 20187
  • Jul 20186
  • Jun 20181
  • May 20181
  • Mar 20182
  • Feb 20182
  • Dec 20171
  • Nov 20171
  • Aug 20173
  • Jul 20171
  • Jun 20171
  • Mar 20174
  • Nov 20161
  • Aug 20162
  • Jul 20161
  • Jun 20161
  • Apr 20161
  • Mar 20161
  • Feb 20161
  • Jan 20165
  • Oct 20151
  • Sep 20151
  • Jul 20153
  • May 20151
  • Mar 20154
  • Feb 20151
  • Jan 20151
  • Dec 20143
  • Nov 20143
  • Oct 201418
  • Sep 20144
  • Aug 20143
  • Jul 20141
  • Jun 20143
  • May 20141
  • Apr 20141
  • Mar 20142
  • Feb 20141
  • Jan 20144
  • Dec 20133
  • Nov 20132
  • Oct 20132
  • Sep 20132
  • Jul 20131
  • Jun 20131
  • Apr 20134
  • Mar 20132
  • Feb 20131
  • Jan 20132
  • Dec 20121
  • Nov 20122
  • Oct 20122
  • Sep 20123
  • Jul 20122
  • Jun 20122
  • May 20121
  • Apr 20121
  • Jan 20124
  • Dec 20114
  • Nov 20114
  • Oct 20111
  • Aug 201116
  • Jan 20117
  • Nov 20108
  • Oct 20109
  • Sep 20108
  • Jun 20103
  • May 20104
  • Apr 20102
  • Mar 20102
  • Feb 20102
  • Jan 20105
  • Dec 20091
  • Nov 20097
  • Oct 20092
  • Sep 200929
  • Aug 20098
  • May 20093
  • Mar 200915
  • Feb 200913
  • Jan 200915
  • Dec 20086
  • Nov 20087
  • Oct 200810
  • Sep 200811
  • Aug 20087
  • Jul 200811
  • Jun 20082
Show more

Labels

  • 5G
  • 8051
  • ADA
  • Analytics
  • Android
  • Animator
  • AODV
  • Apache
  • ARM
  • AWK
  • C
  • C++
  • CentOS
  • Cloud
  • CMS
  • Contiki
  • CPS. Cyber Physical Systems
  • Data Structures
  • Deep Learning
  • Digital Electronics
  • elearning
  • Electrical Engineering
  • Embedded Systems
  • EmbeddedSystems
  • Energy
  • Errors
  • Fedora
  • gnuplot
  • HowTos
  • Installation
  • Internet of Things
  • IOT
  • IoT Tutorials
  • Javascript
  • Kali Linux
  • Linux
  • Linux Commands
  • Linux Kernel Programming
  • Linux Mint
  • Mac OS
  • MANETs
  • Moodle
  • MySQL
  • Network Analyser
  • Network Simulator 2
  • Network Simulator 3
  • Node JS
  • NS2
  • NS2 Errors
  • NS2 Lecture Series
  • NS2 Tutorial
  • NS3
  • nsnamcom
  • Omnet
  • Omnet++
  • Open Source
  • Optical Networks
  • Perl
  • PHP
  • Presentation
  • Protocol
  • Python
  • PyTorch
  • R
  • RealTimeSystems
  • Research
  • Robotics
  • ROS
  • RTOS
  • SDN
  • Sensor Networks
  • Shell
  • Software Engineering
  • Special
  • Stone Letters
  • TCL
  • Testing
  • Tracegraph
  • Ubuntu
  • VANET
  • VHDL
  • Videos
  • Visualizer
  • Windows 10
  • Windows 11
  • Windows 7
  • Windows 8
  • Windows7
  • Wired network
  • wireless
  • Wireshark
  • wordpress
  • xgraph
  • Youtube
Show more

Report Abuse

Từ khóa » Cài đặt Ns2 Trên Ubuntu