LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-06-2017, 12:53 PM   #1
ourt
LQ Newbie
 
Registered: May 2017
Posts: 3

Rep: Reputation: Disabled
ns-2.35, nam Can't find a usable init.tcl in the following directories


Hi.

I tried to install ns2.35.

First i followed first the steps in http://www.techerina.com/2015/02/ins...-mint-171.html. After some tries i managed to install ns2. It would only work in the current terminal. So i followed the https://www.howtoforge.com/tutorial/...-ubuntu-14.04/, now ns2 works and shows sometimes warning: using backward compatibility mode
. My problem if i try to execute nam i get Can't find a usable init.tcl in the following directories: and then This probably means that Tcl wasn't installed properly.
This probably means that Tcl wasn't installed properly.

In the bashrc i wrote:

# LD_LIBRARY_PATH
OTCL_LIB=/home/vaggelis/Documents/ΜΕΤΑΠΤΥΧΙΑΚΟ_ΠΑΠΕΙ/ΒΕΞΑΜΗΝΟ/ΜΕΛΛΟΝΤΙΚΟ_ΔΙΑΔΙΚΤΥΟ_ΚΑΙ_ΝΕΦΟΥΠΟΛΟΓΙΣΤΙΚΗ_ΤΣΑΓΚΑΡΗΣ/ns-allinone-2.35/otcl-1.14
NS2_LIB=/home/vaggelis/Documents/ΜΕΤΑΠΤΥΧΙΑΚΟ_ΠΑΠΕΙ/ΒΕΞΑΜΗΝΟ/ΜΕΛΛΟΝΤΙΚΟ_ΔΙΑΔΙΚΤΥΟ_ΚΑΙ_ΝΕΦΟΥΠΟΛΟΓΙΣΤΙΚΗ_ΤΣΑΓΚΑΡΗΣ/ns-allinone-2.35/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/vaggelis/Documents/ΜΕΤΑΠΤΥΧΙΑΚΟ_ΠΑΠΕΙ/ΒΕΞΑΜΗΝΟ/ΜΕΛΛΟΝΤΙΚΟ_ΔΙΑΔΙΚΤΥΟ_ΚΑΙ_ΝΕΦΟΥΠΟΛΟΓΙΣΤΙΚΗ_ΤΣΑΓΚΑΡΗΣ/ns-allinone-2.35/tcl8.5.10/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/vaggelis/Documents/ΜΕΤΑΠΤΥΧΙΑΚΟ_ΠΑΠΕΙ/ΒΕΞΑΜΗΝΟ/ΜΕΛΛΟΝΤΙΚΟ_ΔΙΑΔΙΚΤΥΟ_ΚΑΙ_ΝΕΦΟΥΠΟΛΟΓΙΣΤΙΚΗ_ΤΣΑΓΚΑΡΗΣ/ns-allinone-2.35/bin:/home/vaggelis/Documents/ΜΕΤΑΠΤΥΧΙΑΚΟ_ΠΑΠΕΙ/ΒΕΞΑΜΗΝΟ/ΜΕΛΛΟΝΤΙΚΟ_ΔΙΑΔΙΚΤΥΟ_ΚΑΙ_ΝΕΦΟΥΠΟΛΟΓΙΣΤΙΚΗ_ΤΣΑΓΚΑΡΗΣ/ns-allinone-2.35/tcl8.5.10/unix:/home/vaggelis/Documents/ΜΕΤΑΠΤΥΧΙΑΚΟ_ΠΑΠΕΙ/ΒΕΞΑΜΗΝΟ/ΜΕΛΛΟΝΤΙΚΟ_ΔΙΑΔΙΚΤΥΟ_ΚΑΙ_ΝΕΦΟΥΠΟΛΟΓΙΣΤΙΚΗ_ΤΣΑΓΚΑΡΗΣ/ns-allinone-2.35/tk8.5.10/unix
#the above two lines beginning from xgraph and ending with unix should come on the same line
NS=/home/vaggelis/Documents/ΜΕΤΑΠΤΥΧΙΑΚΟ_ΠΑΠΕΙ/ΒΕΞΑΜΗΝΟ/ΜΕΛΛΟΝΤΙΚΟ_ΔΙΑΔΙΚΤΥΟ_ΚΑΙ_ΝΕΦΟΥΠΟΛΟΓΙΣΤΙΚΗ_ΤΣΑΓΚΑΡΗΣ/ns-allinone-2.35/ns-2.35/
NAM=/home/vaggelis/Documents/ ΜΕΤΑΠΤΥΧΙΑΚΟ_ΠΑΠΕΙ/ΒΕΞΑΜΗΝΟ/ΜΕΛΛΟΝΤΙΚΟ_ΔΙΑΔΙΚΤΥΟ_ΚΑΙ_ΝΕΦΟΥΠΟΛΟΓΙΣΤΙΚΗ_ΤΣΑΓΚΑΡΗΣ/ns-allinone-2.35/nam-1.15/
PATH=$PATH:$XGRAPH:$NS:$NAM

So what can i do to make nam work, or to remove .profile, bashrc, and ns2 and reinstall?
 
Old 05-06-2017, 01:05 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,425

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
Welcome to LQ.

First : Please use the updated ns-allinone-2.35_gcc482.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing
→ → For gcc versions 4.6 - 5.3 .

Easy : tar xvf ns-allinone-2.35_gcc482.tar.gz
cd ns-allinone-2.35/
./install

"Tutorials" like http://www.techerina.com/2015/02/ins...-mint-171.html
and https://www.howtoforge.com/tutorial/...-ubuntu-14.04/
... can often not be used. Most of them are only tested with one OS / one update level.
And never maintained. May fail a month after they were published.

About .bashrc : Do not add anything. Not required.
This will do : cd ns-allinone-2.35/ns-2.35/ && sudo make install
* I.e. 'make install' will copy 'ns' to /usr/local/bin/, i.e. i.e. a system PATH.
The same for nam : cd nam-1.15/ && sudo make install

-

Last edited by knudfl; 05-06-2017 at 01:22 PM.
 
Old 05-08-2017, 07:47 AM   #3
ourt
LQ Newbie
 
Registered: May 2017
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thank you knudfl for your immediate reply.

If i understood your suggestion properly i must do:

1)download ns2.tar
2)unzip
3)cd ns-allinone-2.35/ns-2.35/ && sudo make install

Must i before step 1 delete the contents/file of .bashrc and .profile or this is unnecessary?
 
Old 05-08-2017, 04:37 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,425

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
Re #3.

1) Download ns-allinone-2.35_gcc482.tar.gz
2) Not a zip file, is a tar file : tar xvf ns-allinone-2.35_gcc482.tar.gz
3) .... How to build ns-2.35 .........
cd ns-allinone-2.35/
./install (that's the build command)

When the build sequence has finished :
cd ns-2.35/
sudo make install ( 'make install' will copy 'ns' to /usr/local/bin/ )
cp ns ns235-orig (this is your backup, and the copy to use for default simulations)
sudo cp ns235-orig /usr/local/bin/
cd ../nam-1.15/
sudo make install

... Now you are ready to run simulations : ns235-orig example1a.tcl
http://www.isi.edu/nsnam/ns/tutorial.../example1a.tcl
http://www.isi.edu/nsnam/ns/tutorial/nsindex.html


I wouldn't worry about the .bashrc ( Probably ignored by ns2.) And a bashrc is replaceable.
* The executable 'ns' or 'ns-any-name' is hard coded to know the location of it's libraries:
ns-allinone-2.35/{ bin/tclsh8*, lib/*tcl8* }.


-

Last edited by knudfl; 05-08-2017 at 04:53 PM.
 
1 members found this post helpful.
Old 05-09-2017, 07:57 AM   #5
ourt
LQ Newbie
 
Registered: May 2017
Posts: 3

Original Poster
Rep: Reputation: Disabled
It finally works!
Thank you very much for your help.
 
  


Reply

Tags
ns2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
fail to ns lte.tcl,I can't find the out.nam file ladyelaine Ubuntu 4 04-09-2015 11:55 PM
NS2: Can't find a usable init.tcl akshathar Linux - Software 2 01-06-2015 07:52 PM
Not Showing any packet transmission in nam upon executing wireless tcl scripts pon Linux - Newbie 0 09-12-2014 09:44 AM
Cannot find Tcl dll ( Perl's Tcl bridge ) Xyem Linux - Software 2 08-08-2006 09:45 AM
VMWare Can't Find Init Directories glennt11 Linux - Software 2 10-23-2004 08:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:10 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