LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-06-2014, 09:01 AM   #1
pon
Member
 
Registered: Aug 2014
Posts: 77

Rep: Reputation: Disabled
Angry How to install multiple ns packages in ubuntu 12.04


hi everyone,

I am new to ns2 , i have ns2.35 in my ubuntu 12.04 , i'd like to add more ns2 packages like ns2.27,2.28,2.33,2.34

i tried to install ns-2.33 along with ns-2.35 but it occurs more errors.
primarily i'd like to install ns-2.33 now ,

so anyone help me to solve this problem

and also how can i switch to one ns pack from other ns pack while execution


Thanks in Advance
 
Old 08-07-2014, 01:57 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

how did you try to install it? What errors occurred?

Evo2.
 
Old 08-07-2014, 02:20 AM   #3
pon
Member
 
Registered: Aug 2014
Posts: 77

Original Poster
Rep: Reputation: Disabled
ya Me.evo

i got erro like Ns make failed,... i already installed ns-23.5 now i am trying to install ns-2.33

when i type gedit ~/.bashrc it is poening file , but when i command


source ~/.bashrc , it is showing

bash: /bin: Is a directory

i used to add and delete LD PATH more times but i did not get message like this before


Kindly support me to clear this issue
 
Old 08-07-2014, 02:23 AM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

sorry, I don't understand what you are trying to say. Please use full words, and when reporting what you did and the errors that result, report *exactly* what was in your terminal Eg cut and paste into [code] blocks.

Evo2.
 
Old 08-07-2014, 02:31 AM   #5
pon
Member
 
Registered: Aug 2014
Posts: 77

Original Poster
Rep: Reputation: Disabled
for installation of ns-2.33

i followed these steps :

step 1.$ sudo apt-get install gcc-4.4 g++-4.4

step 2: sudo apt-get install libxt-dev libx11-dev libxmu-dev xorg-dev xgraph

step 3:cd /home/abdusy/ns-allinone-2.34

// on below steps i made some changes in some files
STEP 4: ~$ gedit /home/abdusy/ns-allinone-2.34/otcl-1.13/configure
Linux*)
SHLIB_CFLAGS=”-fpic”
#SHLIB_LD=”ld -shared” //disabled this line
SHLIB_LD=”gcc -shared” // add this line
SHLIB_SUFFIX=”.so”
DL_LIBS=”-ldl”
SHLD_FLAGS=””
;;

The next file you need to modified is ns-2.34/tools/ranvar.cc and change the line 219.

STEP 5 : ~$ gedit /home/abdusy/ns-allinone-2.34/ns-2.34/tools/ranvar.cc
SOLVED:
double GammaRandomVariable::value()
{
// Proposed by Marsaglia in 2000:
// G. Marsaglia, W. W. Tsang: A simple method for gereating Gamma variables
// ACM Transactions on mathematical software, Vol. 26, No. 3, Sept. 2000
if (alpha_ < 1) {
double u = rng_->uniform(1.0);
//return GammaRandomVariable::GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_); /* Disabled*/
return GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_); /*add this line*/
}

Next step is change the lines 183 and 185 in file ns-2.34/mobile/nakagami.cc.

STEP 6 : ~$ gedit /home/abdusy/ns-allinone-2.34/ns-2.34/mobile/nakagami.cc
SOLVED:
if (int_m == m) {
//resultPower = ErlangRandomVariable::ErlangRandomVariable(Pr/m, int_m).value();
resultPower = ErlangRandomVariable(Pr/m, int_m).value();
} else {
//resultPower = GammaRandomVariable::GammaRandomVariable(m, Pr/m).value();
resultPower = GammaRandomVariable(m, Pr/m).value();
}

The next step is to edit line 270 in tcl8.4.18/unix/Makefile.in.

STEP 7 : ~$ gedit /home/abdusy/ns-allinone-2.34/tcl8.4.18/Makefile.in
SOLVED:
#CC = @CC@
CC = @CC@-4.4

To used gcc-4.4 and g++-4.4 as compiler to compile ns-allinone-2.34, change the line 36-37 in ns-2.34/Makefile.in.

STEP 8 : ~$ gedit /home/abdusy/ns-allinone-2.34/ns-2.34/Makefile.in
SOLVED:
#CC = @CC@
#CPP = @CXX@
CC = @CC@-4.4
CPP = @CXX@-4.4

Also change the line 36-37 in ns-2.34/Makefile

STEP 9 : ~$ gedit /home/abdusy/ns-allinone-2.34/ns-2.34/Makefile
SOLVED:
#CC = gcc
#CPP = g++
CC = gcc-4.4
CPP = g++-4.4

Final Step: cd na-allinone-2.33/ ./install

Error: Ns make failed,....

But one notable thing was after gone through these procedures i was not able to execute ns files in prev ns-2.35,

shown like ns not installed ,

again now i successfully installed ns-2.35
 
Old 08-07-2014, 02:44 AM   #6
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

that's a somewhat convoluted procedure. I'm afraid it will be difficult to understand what is going on.

Why are you following this procedure? Why can't you just do
Code:
./configure --prefix=/path/to/somewhere
make
make install
Also, why do you want so many versions of ns installed?

Evo2.
 
Old 08-07-2014, 02:47 AM   #7
pon
Member
 
Registered: Aug 2014
Posts: 77

Original Poster
Rep: Reputation: Disabled
Error message on terminal is:

config.status: creating Makefile
rm -f libotcl.so otcl.o so_locations
gcc -c -g -O2 -DNDEBUG -DUSE_SHM -fpic -I. -I/home/chase/ns-allinone-2.34/include -I/home/chase/ns-allinone-2.34/include -I/home/chase/ns-allinone-2.34/include -I/include otcl.c
ld -shared -o libotcl.so otcl.o
otcl.o: In function `OTclDispatch':
/home/chase/ns-allinone-2.34/otcl-1.13/otcl.c:495: undefined reference to `__stack_chk_fail_local'
otcl.o: In function `Otcl_Init':
/home/chase/ns-allinone-2.34/otcl-1.13/otcl.c:2284: undefined reference to `__stack_chk_fail_local'
ld: libotcl.so: hidden symbol `__stack_chk_fail_local' isn't defined
ld: final link failed: Bad value
make: *** [libotcl.so] Error 1
otcl-1.13 make failed! Exiting ...

Last edited by pon; 08-07-2014 at 02:48 AM.
 
Old 08-07-2014, 03:01 AM   #8
pon
Member
 
Registered: Aug 2014
Posts: 77

Original Poster
Rep: Reputation: Disabled
i need it to be installed because i am getting patch files of various protocols each in different ns-versions ,

i followed the procedure from link below:

http://abdusyarif.wordpress.com/2012...ntu-12-04-lts/

most of the people suggested is to modify makefile.in,packet.h, and someother files,

so only i gone through that complicated procedure,

i installed ns-2.35 multiple times in my computer by simple commands as like you said in post #6 , that too i tried for ns-2.34 not worked,...
 
Old 08-07-2014, 03:01 AM   #9
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

sorry, can't help if I don't understand what you are trying to do and why. That is why I asked questions. After that we can try to address specific problems you are having.

Evo2.
 
Old 08-07-2014, 03:10 AM   #10
pon
Member
 
Registered: Aug 2014
Posts: 77

Original Poster
Rep: Reputation: Disabled
Ok Thanks,,....

i ll try,..
 
Old 08-07-2014, 03:56 AM   #11
pon
Member
 
Registered: Aug 2014
Posts: 77

Original Poster
Rep: Reputation: Disabled
New problem i am facing in ubuntu [Apart from abovesaid problem]

When i open a terminal in ubuntu 12.04 Lts i am getting 1st line like

bash: /bin: Is a directory
chase@chase-desktop:~$



when i command source ~/.bashrc

i am getting like: bash: /bin Is a directory,

WHY IT IS COMING LIKE THIS,SOMEONE HELP ME,

Before that i worked on terminals and edited bashrc so many times , but i did not get those messages
 
Old 08-07-2014, 04:06 AM   #12
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

post #4 seems to indicate that you have edited your ~/.bashrc in doing so you may have broken your environment. You can return it to its original state by recopying it from /etc/skel. For example

Code:
cp ~/.bashrc ~/.bashrc.backup
cp /etc/skel/.bashrc ~/
Did you edit any other files in your home directory?

Evo2.

PS. Please don't yell at us.
 
1 members found this post helpful.
Old 08-07-2014, 04:34 AM   #13
pon
Member
 
Registered: Aug 2014
Posts: 77

Original Poster
Rep: Reputation: Disabled
Could you please come to thread on below link, there i attached screen shot of my terminal in post#1
because in this thread i am not able to attach screenshot i dont know why ,


sorry for your inconvenience , Thanks for your patience.

http://www.linuxquestions.org/questi...63#post5216763
 
Old 08-07-2014, 04:39 AM   #14
pon
Member
 
Registered: Aug 2014
Posts: 77

Original Poster
Rep: Reputation: Disabled
Super evo2 , i followed the command in post #12
and i solved this bashrc file issue, but still problem in ns-2.33 installation is pending

My humble thanks to you Mr.EVO
Thanks A loTTTTTTTTTtt

I solved issue in opening teminal
 
  


Reply

Tags
ns-2, ns-2.34, ubuntu 12.04


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
[SOLVED] Install multiple .deb packages(Including dependencies) shayan2k13 Linux - Software 4 04-23-2013 01:03 PM
How to install multiple packages using yum noony123 Linux - Newbie 3 12-15-2010 07:10 AM
how to use apt-get/aptitude/dpkg in ubuntu to install packages on a HDD (booting ubuntu from CD) gujedan Linux - Newbie 1 10-07-2010 07:02 AM
how to install rpm packages of the same version in multiple locations bvpurandare Linux - General 2 03-18-2009 05:14 PM
How can I install the following packages in Ubuntu or Kubuntu? izquierdista Ubuntu 6 07-07-2007 06:44 PM

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

All times are GMT -5. The time now is 11:10 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration