LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-25-2012, 11:07 AM   #16
lucky89
LQ Newbie
 
Registered: Mar 2012
Posts: 19

Rep: Reputation: Disabled

hi
thanks
i used the olsr_exemple.tcl from http://masimum.inf.um.es/fjrm/wp-upl...sr_example.tcl
it is an exemple simulation of OLSR
 
Old 09-17-2012, 02:37 PM   #17
nirvruti
LQ Newbie
 
Registered: Sep 2012
Posts: 14

Rep: Reputation: Disabled
ns2.33 on ubanto 12.04

Error
ggetting otcl failed error Existing when trying to install ns2.33 on uantu 12.04
 
Old 09-17-2012, 03:30 PM   #18
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Post # 17, @nirvruti.

Suggest : Use gcc / g++ version 4.1.2 :

gcc41-compat "1204" https://docs.google.com/open?id=0B7S...lNURldUenRyb3c
g++41-compat https://docs.google.com/open?id=0B7S...hjMjljN2M2MGU4

sudo dpkg -i gcc41-compat-4.1.2.ubu1204_i386.deb g++41-compat-4.1.2_i386.deb
.. Then reboot, and the new compiler can be used :

cd ns-allinone-2.33/ && export CC=gcc41 CXX=g++41 && ./install

.
 
1 members found this post helpful.
Old 09-17-2012, 09:35 PM   #19
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
knudfl
you look like a bit of an expert on NS2 ( and the various versions )

do you have an idea WHY so many are using 2.29 and older versions other than 2.34
(and not patching it to work with gcc41)
and why ns2 and on NEW os's ( the new os part is easy )

a "guess" is some 10 year old textbooks
and unqualified ( in Linux)teachers
 
Old 09-18-2012, 01:52 PM   #20
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 19

Hi John.

Most of the available extra patches / protocols are written for ns2
versions 2.26 2.27 2.28 2.29 2.30 2.31 2.32 2.33 ( 2.34 ).
The source code files are c++ files.

Thus the easy way is to use the ns2 version that the patch was meant for.
In very rare occasions, an LQ member will modify the code to a later ns2.

About the protocols that teachers will suggest : Don't know.
But may be the teachers will assign an ns2 protocol,
that they used 10 years ago, when they were students.

.
 
Old 06-02-2014, 01:53 AM   #21
hd_uni_pro
Member
 
Registered: Mar 2014
Posts: 31

Rep: Reputation: Disabled
confiused-install-ubontu

Installation of ns-2.34 in Ubuntu (preferably 12.04)

1.Download ns-allinone-2.34.tar.gz file from
http://sourceforge.net/projects/nsnam/files/

2.Copy the ns-allinone-2.34.tar.gz file in to the desktop directory.
Note: All the commands listed from here assumes the ns2 to be in desktop; you can put the extracted file anywhere and change the address in the commands correspondingly.

3.open terminal type:
sudo apt-get update (to get list of update packages/libraries in OS)

3.Install required libraries for ns2 using terminal:
sudo apt-get install build-essential autoconf automake libxmu-dev
sudo apt-get install xorg-dev g++ xgraph

4.Extract the ns-allinone-2.34.tar.gz file by typing following commands in terminal:
cd Desktop <Enter>
tar zxvf ns-allinone-2.34.tar.gz <Enter>
(A new folder named ns-allinone-2.34 will be generated.)

5.To avoid installation errors modify the specified files in ns-allinone-2.34 folder as specified below:

i.In ns-allinone-2.34/otcl-1.13/configure
change into
SHLIB_LD="gcc -shared"
instead of
SHLIB_LD="ld -shared"

ii.ns-allinone-2.34/ns-2.34/tools/ranvar.cc line:219 change
return GammaRandomVariable::GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);
to
return GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);

iii.Change the lines 183 % and 185 in file ns-allinone-2.34/ns-2.34/mobile/nakagami.cc to
resultPower = ErlangRandomVariable(Pr/m, int_m).value();
and
resultPower = GammaRandomVariable(m, Pr/m).value();
respectively.

iv.Next add a bellow line after line 64 in ns-allinone-2.34/ns-2.34/mac/mac-802_11Ext.h
#include <stddef.h>

6. Installation. in terminal goto Desktop/ns-allinone-2.34 and type:
./install
This takes about 5min and note down the instructions you get for setting path.

7. Setting Path;According to instructions you get on the terminal after installation change the following path

i.In terminal sudo gedit ~/.bash_aliases

ii.Then copy the following path into .bash_aliases and modify according to your instructions:

# LD_LIBRARY_PATH
OTCL_LIB=/home/anurag/Desktop/ns-allinone-2.34/otcl-1.13
NS2_LIB=/home/anurag/Desktop/ns-allinone-2.34/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB

# TCL_LIBRARY
TCL_LIB=/home/anurag/Desktop/ns-allinone-2.34/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/home/anurag/Desktop/ns-allinone-2.34/bin:/home/anurag/Desktop/ns-allinone-2.34/tcl8.4.18/unix:/home/anurag/Desktop/ns-allinone-2.34/tk8.4.18/unix
NS=/home/anurag/Desktop/ns-allinone-2.34/ns-2.34/
NAM=/home/anurag/Desktop/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM

iii.Then it takes effect immediately you should give below mentioned using terminal.
source ~/.bashrc

8. Now move to Desktop/ns-allinone-2.34/ns-2.34 and type:
./validate
Validations tests are performed for about 10-15 min.

9.If you type ns in your terminal % should be displayed.

-----------------------------------------This Completes the installation----------------------------------------

Last edited by hd_uni_pro; 06-02-2014 at 05:25 AM.
 
1 members found this post helpful.
Old 06-02-2014, 05:35 AM   #22
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 21 .

Copy the two packages into an empty <new-folder> , and type ..
$ sudo dpkg -i *
... Then you can avoid your typos.

Or just click the packages, and the "Package Installer" will do the job.


Generally about typos when typing a command :
Use the completion in your dash/bash terminal →
Type in the two first letters, and <TAB> : The possible choices will be shown.
Examples : 1) $ sudo dpkg - i gc<TAB> 2) $ sudo dpkg - i g+<TAB>

Or use copy / paste , when its a long command.
Also :
Why not use copy / paste for your short error outputs instead of image.png ?
Show your error messages in 'Code Tags' : Much nicer.

-
 
Old 07-14-2014, 11:52 AM   #23
must
LQ Newbie
 
Registered: Jan 2014
Posts: 19

Rep: Reputation: Disabled
invalid command name "Phy/WirelessPhy/OFDM"

hi everyone, I work with Wimax but when i execute TCL i got this error:

invalid command name "Phy/WirelessPhy/OFDM"
while executing
"Phy/WirelessPhy/OFDM create _o18 "
 
Old 11-28-2014, 04:59 AM   #24
amitkatre1989@gmail.com
LQ Newbie
 
Registered: Nov 2014
Posts: 3
Blog Entries: 1

Rep: Reputation: Disabled
Angry Permission denied

user@ubuntu:~/ns-allinone-2.33/tk8.4.18/unix$ ./configure
./configure: line 1892: config.log: Permission denied
./configure: line 1902: config.log: Permission denied



Hello friend I am facing problem while configuring tk8.4.18 ..please help me..
 
Old 11-28-2014, 07:09 AM   #25
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Post #24, @amitkatre1989@gmail.com : Welcome to LQ.

Start from scratch in /home/<name>/<ns2>/ with :
$ tar xvf ns-allinone-2.33.tar.gz
. http://sourceforge.net/projects/nsna...ar.gz/download

* I.e. use no 'sudo', use no Windows© tool for the unpack :
* That will all cause "Permission denied".

-
 
Old 11-28-2014, 08:55 AM   #26
amitkatre1989@gmail.com
LQ Newbie
 
Registered: Nov 2014
Posts: 3
Blog Entries: 1

Rep: Reputation: Disabled
How to Uninstall Ns-2.33

knudfl@ thank you for your response.

Can you please tell me how to uninstall it and command to reinstall it without sudo..
 
Old 11-28-2014, 09:55 AM   #27
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
← #26 .
Quote:
Can you please tell me how to uninstall it
If "it" means an ns-allinone-2.33/ that was unpacked with
$ sudo tar xvf ns-allinone-2.33.tar.gz :
Deleting is : $ sudo rm -r ns-allinone-2.33/


Quote:
.. reinstall it without sudo
See post #25 : $ tar xvf ns-allinone-2.33.tar.gz
And : $ cd ns-allinone-2.33/
$ export CC=gcc41 CXX=g++41 && ./install

* When you have specified the "Ubuntu version",
you can get information about the "gcc41/g++41" version,
that will work with your OS :
a) Please show the output from the command : $ uname -m
b) $ cat /etc/issue

-
 
Old 11-28-2014, 10:00 AM   #28
amitkatre1989@gmail.com
LQ Newbie
 
Registered: Nov 2014
Posts: 3
Blog Entries: 1

Rep: Reputation: Disabled
I have removed previous installation.

I am trying to install fresh ns-2.33 but otcl-1.13 is not getting installed.

Please see the error======>


Installing libtk8.4.a to /home/amit/ns2/ns-allinone-2.33/lib/
Installing wish as /home/amit/ns2/ns-allinone-2.33/bin/wish8.4
Installing tkConfig.sh to /home/amit/ns2/ns-allinone-2.33/lib/
Installing libtkstub8.4.a to /home/amit/ns2/ns-allinone-2.33/lib/
Making directory /home/amit/ns2/ns-allinone-2.33/lib/tk8.4/images
Making directory /home/amit/ns2/ns-allinone-2.33/lib/tk8.4/msgs
Installing header files
Installing library files to /home/amit/ns2/ns-allinone-2.33/lib/tk8.4
Installing library images directory
Installing translation directory
Making directory /home/amit/ns2/ns-allinone-2.33/lib/tk8.4/demos
Making directory /home/amit/ns2/ns-allinone-2.33/lib/tk8.4/demos/images
Installing demos to /home/amit/ns2/ns-allinone-2.33/lib/tk8.4/demos/
Installing demo images
Installing and cross-linking top-level (.1) docs
Installing and cross-linking C API (.3) docs
Installing and cross-linking command (.n) docs
tk8.4.18 installation succeeded.
============================================================
* Build OTcl-1.13
============================================================
./install: 497: ./install: ./configure: Permission denied
otcl-1.13 configuration failed! Exiting ...
Please check http://www.isi.edu/nsnam/ns/ns-problems.html
================================================================================



After that I am manually trying to configure otcl
but its telling "bash: ./configure: Permission denied""



What to do please help
 
Old 11-28-2014, 10:43 AM   #29
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
← #28 .

Please use a valid "ns-allinone-2.33.tar.gz"
http://sourceforge.net/projects/nsna...ar.gz/download

? Are you sure you did : $ tar xvf ns-allinone-2.33.tar.gz
?

-
 
Old 11-28-2014, 01:30 PM   #30
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
you run " ./configure --options --MoreOptions --AndYetMoreOptions "
as a NORMAL USER
you run " make"
as a NORMAL USER

then you become root TO INSTALL
Code:
su 
--- root password when asked for
make install
you almost ALWAYS need to be ROOT to run the "install" part
 
  


Reply

Tags
g++41-compat-1204, ns2



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ns2.34 installation help in Ubuntu 10.10 xptional Ubuntu 46 04-02-2018 01:42 PM
how to install ns2 in ubuntu 11.10 miu Linux - Networking 20 10-31-2013 02:50 PM
ns2.29 installation in ubuntu bolmeteus Ubuntu 4 02-08-2011 01:46 PM
NS2 2.34 Ubuntu abc Linux - Networking 14 09-16-2010 05:58 PM
i am using ubuntu as os. for NS2 to implement a routing protocol in ns2. sujovasu Programming 1 07-27-2010 01:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration