+ Post New Thread
Results 1 to 13 of 13
  1. #1
    Member level 4
    Points: 2,326, Level: 11

    Join Date
    May 2006
    Location
    Nowshera, Pakistan
    Posts
    77
    Helped
    6 / 6
    Points
    2,326
    Level
    11

    ns2 installation

    you can follow these steps in any linux environment

    INSTALLING NS-2 ON FEDORA 8

    STEP 1

    From terminal login as super user and do the following.(internet must also be connected in order to install the package dependencies.

    yum install autoconf
    yum install automake
    yum install gcc-c++
    yum install libX11-devel
    yum install xorg-x11-proto-devel
    yum install libXt-devel
    And for nam installation (optional):
    yum install libXmu-devel

    STEP 2

    From terminal go to the folder where the ns-allinone patch is placed and type the following to extract
    $ tar -xzf ns-allinone-2.31.tar.gz
    $ cd ns-allinone-2.29
    $. /install

    STEP 3

    Now go to /etc folder and type

    gedit ~/.bashrc

    Add the following lines to the end of it. Remember replace "/your/path" by something like "/home/kazim". And accordingly also change the version numbers. This is for ns 2.31.

    # LD_LIBRARY_PATH
    OTCL_LIB=/your/path/ns-allinone-2.31/otcl-1.13
    NS2_LIB=/your/path/ns-allinone-2.31/lib
    X11_LIB=/usr/X11R6/lib
    USR_LOCAL_LIB=/usr/local/lib
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LI B:$X11_LIB:$USR_LOCAL_LIB

    # TCL_LIBRARY
    TCL_LIB=/your/path/ns-allinone-2.31/tcl8.4.14/library
    USR_LIB=/usr/lib
    export TCL_LIBRARY=$TCL_LIB:$USR_LIB

    # PATH
    XGRAPH=/your/path/ns-allinone-2.31/bin:/your/path/ns-allinone-2.31/tcl8.4.14/unix:/your/path/ns-allinone-2.31/tk8.4.14/unix
    NS=/your/path/ns-allinone-2.31/ns-2.31/
    NAM=/your/path/ns-allinone-2.31/nam-1.13/
    PATH=$PATH:$XGRAPH:$NS:$NAM

    Let it take effect immediately

    source ~/.bashrc



    Note: the step described above is important; otherwise, you cannot run ns successfully.
    or you can restart your X windows.i.e. logout and then login, or reboot your system, to make it work.)

    Now, the installation has been completed. If you try:
    $ ns

    Then a "%" will appear on the screen.type "exit" to quit the mode and back to "$"


    If you miss out step 1 you may get the following errors

    Build XGraph-12.1
    ================================================== ==========
    loading cache ./config.cache
    checking for a BSD compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking whether make sets ${MAKE}... yes
    checking for working aclocal... missing
    checking for working autoconf... missing
    checking for working automake... missing
    checking for working autoheader... missing
    checking for working makeinfo... missing
    checking if malloc debugging is wanted... no
    checking for gcc... no
    checking for cc... no
    configure: error: no acceptable cc found in $PATH
    make: *** No targets specified and no makefile found. Stop.
    Can not create xgraph; But xgraph is an optional package, continuing...

    If you miss step 3

    At the prompt when you type ns you will get
    Ns command not found

  2. #2
    Newbie level 3
    Points: 503, Level: 4

    Join Date
    Mar 2010
    Posts
    3
    Helped
    0 / 0
    Points
    503
    Level
    4

    Re: these are the steps to install NS-2

    I am getting an error of NS -make failed wat sud i do??



  3. #3
    Newbie level 4
    Points: 902, Level: 6

    Join Date
    Dec 2009
    Location
    Pondicherry
    Posts
    5
    Helped
    2 / 2
    Points
    902
    Level
    6

    Re: these are the steps to install NS-2

    Quote Originally Posted by adi.svp
    I am getting an error of NS -make failed wat sud i do??

    can u tell me in which platform u r installing ns2 and which version? u can contact me at my mail arkmec@gmail.com



    •   Alt7th March 2010, 18:35

      advertising

        
       

  4. #4
    Junior Member level 3
    Points: 2,045, Level: 10
    Achievements:
    7 years registered

    Join Date
    Jan 2006
    Posts
    28
    Helped
    2 / 2
    Points
    2,045
    Level
    10

    Re: these are the steps to install NS-2

    Running NS2 in windows is very easy. Here is a step by step tutorial how to install it in Windows:
    Ns2 Installation on Windows | paulson.in

    I just did recently and I found it very useful



    •   Alt13th October 2010, 21:34

      advertising

        
       

  5. #5
    Newbie level 2
    Points: 185, Level: 2

    Join Date
    Dec 2011
    Posts
    2
    Helped
    0 / 0
    Points
    185
    Level
    2

    Re: these are the steps to install NS-2

    hi..
    i have followed the same instructions mentioned "in the steps to install ns2" ..
    when i have completed all the procedure and write in terminal " ns"
    % sign appears but before this a message is displayed

    .................................................. ..................
    bash: export: :/usr/X11R6/lib:/usr/local/lib': not a valid identifier
    [anam@localhost ~]$ ns
    %

    .....................
    what does it mean...is ns is not working properly....



  6. #6
    Member level 4
    Points: 2,326, Level: 11

    Join Date
    May 2006
    Location
    Nowshera, Pakistan
    Posts
    77
    Helped
    6 / 6
    Points
    2,326
    Level
    11

    Re: these are the steps to install NS-2

    well if the sign appears that it is installed. no worries



    •   Alt24th December 2011, 00:54

      advertising

        
       

  7. #7
    Newbie level 2
    Points: 181, Level: 2

    Join Date
    Dec 2011
    Location
    Morocco
    Posts
    2
    Helped
    0 / 0
    Points
    181
    Level
    2

    Re: these are the steps to install NS-2

    Salam,
    First, thank you Kazim for this tutorial.
    Second, in response to adi.svp, you have to execute “./install” as a root.
    Third, to anamnazir (to Kazim too), there is a typo in the tutorial “$NS2_LI B”. There should be no space.
    Fourth, Thank you and have a nice coding .



  8. #8
    Newbie level 3
    Points: 182, Level: 2

    Join Date
    Dec 2011
    Posts
    3
    Helped
    0 / 0
    Points
    182
    Level
    2

    Re: ns2 installation

    nstallation &validation failed in ns2.31 on ubuntu 10.04 lucid
    hi sir

    Actually me and my friends trying to install ns2.31 on ubuntu 10.04 since 1 month but not good results came yet.this is the error came when i install and validate....

    error occur while ./install

    checking for XShmAttach in -lXext... yes
    checking for ranlib... ranlib
    checking for a BSD-compatible install... /usr/bin/install -c
    checking system version (for dynamic loading)... Linux-2.6.32-33-generic
    No explicit static compilation flag; setting V_STATIC to ""
    checking for dlopen in -ldl... yes
    checking for a BSD-compatible install... /usr/bin/install -c
    configure: creating ./config.status
    config.status: creating Makefile
    rm -f libotcl.so otcl.o so_locations
    gcc-4.3 -c -g -O2 -DNDEBUG -DUSE_SHM -fpic -I. -I/home/guna/ns-allinone-2.31/include -I/home/guna/ns-allinone-2.31/include -I/home/guna/ns-allinone-2.31/include -I/include otcl.c
    make: gcc-4.3: Command not found
    make: *** [libotcl.so] Error 127
    otcl-1.13 make failed! Exiting ...
    See The Network Simulator ns-2: Installation Problems and Help for problems
    guna@ubuntu:~/ns-allinone-2.31$

    error occur while ./validate

    Running test full-asymmetric:
    ../../ns test-suite-delaybox.tcl full-asymmetric QUIET
    ./test-all-template1: 149: ../../ns: Too many levels of symbolic links
    Test not implemented
    All test output agrees with reference output.
    Fri Dec 30 12:22:30 IST 2011
    These messages are NOT errors and can be ignored:
    warning: using backward compatibility mode
    This test is not implemented in backward compatibility mode

    validate overall report: some tests failed:
    ./test-all-simultaneous
    to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
    Notice that some tests in webcache will fail on freebsd when -O is turned on.
    This is due to some event reordering, which will disappear when -g is turned on.
    guna@ubuntu:~/ns-allinone-2.31/ns-2.31$ source ~/.bashrc
    guna@ubuntu:~/ns-allinone-2.31/ns-2.31$ ns
    ns: command not found
    guna@ubuntu:~/ns-allinone-2.31/ns-2.31$

    sir,

    i used so many different installation steps all is failed, currently i used this steps......

    How to install NS2 with Ubuntu 10.04 By Noor Zaman

    This manual will work for NS2 allinone-2.34 with Ubuntu 10.4. As Ubuntus new version 10.04 needs following packages before any further installation, otherwise it will not work with it.
    Please follow the following steps:

    1. Install necessary tools for building:

    sudo apt-get install build-essential autoconf automake libxmu-dev gcc-4.3

    2. It turns out that otcl does not like the version of gcc installed by default in Lucid. So go ahead and change ns-allinone-2.34/otcl-1.13/Makefile.in. Find the line that says:

    CC= @CC@
    and change it to:
    CC= gcc-4.3
    3. Now follow the following steps for installation of nsallinone 2.34 and it will work with your machine. (copy ns-allinone-2.34.tar.gz)

    Suppose that there is "ns-allinone-2.33.tar.gz" in current directory (e.g. "~/" for me is "/home/noor").
    All steps are done in Terminal, so open a terminal in Accessories/Terminal.To extract the file:
    tar xvfz ./ns-allinone-2.33.tar.gz


    4. Change your directory within terminal as following way

    $ cd /home/noor$ cd /home/noor/ns-allinone-2.34

    5. Download & install some packages from repository if needed (Now its optional)

    $ sudo apt-get install build-essential autoconf automake libxmu-dev
    6. Install the ns2

    $ cd ns-allinone-2.34
    $ ./install
    7. Edit some paths

    $ gedit ~/.bashrc
    8. Put these lines on that file in the last. Off course, you might change /home/noor for it depends on where you extract ns-allinone-2.34.tar.

    # LD_LIBRARY_PATHOTCL_LIB=/home/noor/ns-allinone-2.34/otcl-1.13NS2_LIB=/home/noor/ns-allinone-2.34/libX11_LIB=/usr/X11R6/libUSR_LOCAL_LIB=/usr/local/libexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LI B:$X11_LIB:$USR_LOCAL_LIB# TCL_LIBRARYTCL_LIB=/home/noor/ns-allinone-2.34/tcl8.4.18/libraryUSR_LIB=/usr/libexport TCL_LIBRARY=$TCL_LIB:$USR_LIB# PATHXGRAPH=/home/noor/ns-allinone-2.34/bin:/home/noor/ns-allinone-2.34/tcl8.4.18/unix:/home/noor/ns-allinone-2.34/tk8.4.18/unix:/home/noor/ns-allinone-2.34/xgraph-12.1/NS=/home/noor/ns-allinone-2.34/ns-2.34/NAM=/home/noor/ns-allinone-2.34/nam-1.13/export PATH=$PATH:$XGRAPH:$NS:$NAM

    9. Validate it (take very long time compare to install process)
    $ cd ns-2.33$ ./validate

    10. Let it take effect immediately

    $ source ~/.bashrc

    11. Try to run it as following way, by just typing ns with terminal

    $ ns
    12. If the installation is successful, then you will be able to see % at the command prompt. Type following command to exit
    % exit

    13. Good luck and please keep remember me in your prays(Thanks in advance). Noor Zaman, King Faisal University, Saudi Arabia.


    sir pls help me...thanks in advance.....



  9. #9
    Newbie level 2
    Points: 181, Level: 2

    Join Date
    Dec 2011
    Location
    Morocco
    Posts
    2
    Helped
    0 / 0
    Points
    181
    Level
    2

    Re: ns2 installation

    What is the version of the installed gcc ? (Type "gcc -v")



  10. #10
    Newbie level 3
    Points: 182, Level: 2

    Join Date
    Dec 2011
    Posts
    3
    Helped
    0 / 0
    Points
    182
    Level
    2

    Re: ns2 installation

    Quote Originally Posted by Amine Karafi View Post
    What is the version of the installed gcc ? (Type "gcc -v")
    hi sir
    i tried with gcc4.3 and 4.1, both are not working...can u give me a clear installation steps for ns2.31 on ubuntu 10.04..thanks in advance...



    •   Alt10th January 2012, 06:35

      advertising

        
       

  11. #11
    Newbie level 1
    Points: 79, Level: 1

    Join Date
    Jul 2012
    Posts
    1
    Helped
    0 / 0
    Points
    79
    Level
    1

    Re: ns2 installation

    Respected Sir, i am trying to install yum in my FEDORA 17, but it is giving error as below. Please guide me to install the YUM.


    [root@ECC staff]# yum install gcc
    Loaded plugins: langpacks, presto, refresh-packagekit
    Error: Cannot retrieve metalink for repository: fedora. Please verify its path and try again



  12. #12
    Newbie level 1
    Points: 13, Level: 1

    Join Date
    Feb 2013
    Posts
    1
    Helped
    0 / 0
    Points
    13
    Level
    1

    Re: ns2 installation

    on writing ./install, m getting permission denied



  13. #13
    Newbie level 2
    Points: 19, Level: 1

    Join Date
    Mar 2013
    Posts
    2
    Helped
    0 / 0
    Points
    19
    Level
    1

    Re: these are the steps to install NS-2

    Sir Kazim ,
    I install ns2 upto step 2 successfully.but i m geting problem in step 3.....in bash file i m unable to paste path..the new tab i m opening to give path is not getting path....Click image for larger version. 

Name:	Screenshot.png 
Views:	3 
Size:	226.8 KB 
ID:	87849
    please help me...thanks in advance ...



--[[ ]]--