LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-22-2015, 12:53 PM   #16
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154

See post #13 :
/usr/lib/jvm/java-7-oracle/include/
/usr/lib/jvm/java-7-oracle/include/linux/
/usr/lib/jvm/java-7-oracle/jre/lib/i386/client/libjvm.so

HOWTO copy files :
Code:
sudo cp /usr/lib/jvm/java-7-oracle/include/*.h /usr/local/include/
sudo cp /usr/lib/jvm/java-7-oracle/include/linux*.h /usr/local/include/
sudo cp /usr/lib/jvm/java-7-oracle/jre/lib/i386/client/libjvm.so /usr/local/lib/
 
1 members found this post helpful.
Old 03-22-2015, 07:45 PM   #17
samankarami
LQ Newbie
 
Registered: Feb 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by knudfl View Post
See post #13 :


HOWTO copy files :
i am very lucky to have someone like you.i install nsj and i have this notic

Ns-allinone package has been installed successfully.
Here are the installation places:
tcl8.5.10: /home/saman/nsj/{bin,include,lib}
tk8.5.10: /home/saman/nsj/{bin,include,lib}
otcl: /home/saman/nsj/otcl-1.14
tclcl: /home/saman/nsj/tclcl-1.20
ns: /home/saman/nsj/ns-2.35/ns
nam: /home/saman/nsj/nam-1.15/nam
xgraph: /home/saman/nsj/xgraph-12.2
gt-itm: /home/saman/nsj/itm, edriver, sgb2alt, sgb2ns, sgb2comns, sgb2hierns

----------------------------------------------------------------------------------

Please put /home/saman/nsj/bin:/home/saman/nsj/tcl8.5.10/unix:/home/saman/nsj/tk8.5.10/unix
into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph.

IMPORTANT NOTICES:

(1) You MUST put /home/saman/nsj/otcl-1.14, /home/saman/nsj/lib,
into your LD_LIBRARY_PATH environment variable.
If it complains about X libraries, add path to your X libraries
into LD_LIBRARY_PATH.
If you are using csh, you can set it like:
setenv LD_LIBRARY_PATH <paths>
If you are using sh, you can set it like:
export LD_LIBRARY_PATH=<paths>

(2) You MUST put /home/saman/nsj/tcl8.5.10/library into your TCL_LIBRARY environmental
variable. Otherwise ns/nam will complain during startup.


After these steps, you can now run the ns validation suite with
cd ns-2.35; ./validate

For trouble shooting, please first read ns problems page
http://www.isi.edu/nsnam/ns/ns-problems.html. Also search the ns mailing list archive
for related posts.

HOW i do that?
thanks alot for your usefull and exact answering

Last edited by samankarami; 03-22-2015 at 07:49 PM.
 
Old 03-22-2015, 10:19 PM   #18
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
<<< ref. #17.

""Please put /home/saman ...., IMPORTANT NOTICES: (1) You MUST put.."" :
All together some old ~1999 text meant for a 'University Computer'.
Not valid when it's your computer, and you can do 'make install'.
( With a 'University Computer' you had no write permissions to /usr/.)

This will do : $ cd ns-allinone-2.35/ns-2.35/ && sudo make install
I.e. 'make install' will copy the executable 'ns' to /usr/local/bin/.

Besides that, 'ns' is hard coded to know the location of its libraries:
ns-allinone-2.35/{ lib/*, bin/tcsh8* }.
So at large the ~16 year old *PATH text makes no sense any more.


-
 
1 members found this post helpful.
Old 03-23-2015, 05:07 AM   #19
samankarami
LQ Newbie
 
Registered: Feb 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
Question

Quote:
Originally Posted by knudfl View Post
<<< ref. #18.

( With a 'University Computer' you had no write permissions to /usr/.)

So at large the ~16 year old *PATH text makes no sense any more.


-
i am electronic engineering and not know enough about linux and ns2.and i work on my thesis at home because my univesity is 9 hour far from my home.and my workplace is near my house.
if you answer me it'll be good for me because only you,have exact and complete answering and i am very thankful for that.
now with your helping i install nsj but at the end imust change path and need your help again please don't let me alone and tell me what i do now?
 
Old 03-23-2015, 06:50 AM   #20
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
I guess you have write / install permissions to /usr/,
on the computers you have used in the above posts.

Else you could not have done :
1) Install java to a system path (/usr/)
Or 2) Copy the java headers / libjvm.so to /usr/local/*
( Which is also a system path.)

Can you or can you not do $ sudo make install
in ns-2.35/ ?


-
 
1 members found this post helpful.
Old 03-23-2015, 08:05 AM   #21
samankarami
LQ Newbie
 
Registered: Feb 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
Question

Quote:
Originally Posted by knudfl View Post
I guess you have write / install permissions to /usr/,
on the computers you have used in the above posts.

Else you could not have done :
1) Install java to a system path (/usr/)
Or 2) Copy the java headers / libjvm.so to /usr/local/*
( Which is also a system path.)

Can you or can you not do $ sudo make install
in ns-2.35/ ?


-
i download oracle java 7(java1.7.0_80 ea)then follow this instruction i install it:
$sudo mv ./jdk1.7.0_80 /usr/lib/jvm/jdk1.7.0
$sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1
$sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1
$sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1
$sudo update-alternatives --config java

There are 3 choices for the alternative java (providing /usr/bin/java).

Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java 1061 auto mode
1 /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java 1061 manual mode
2 /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java 1051 manual mode
*3 /usr/lib/jvm/jdk1.7.0/bin/java 1 manual mode

Press enter to keep the current choice[*], or type selection number: 3

$sudo update-alternatives --config javaws

There are 3 choices for the alternative javaws (providing /usr/bin/javaws).

Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-6-openjdk-i386/jre/bin/javaws 1061 auto mode
1 /usr/lib/jvm/java-6-openjdk-i386/jre/bin/javaws 1061 manual mode
2 /usr/lib/jvm/java-7-openjdk-i386/jre/bin/javaws 1060 manual mode
* 3 /usr/lib/jvm/jdk1.7.0/bin/javaws 1 manual mode

Press enter to keep the current choice[*], or type selection number: 3

$sudo update-alternatives --config javac
There is only one alternative in link group javac: /usr/lib/jvm/jdk1.7.0/bin/javac
Nothing to configure.

$java -version
java version "1.7.0_80-ea"
Java(TM) SE Runtime Environment (build 1.7.0_80-ea-b05)
Java HotSpot(TM) Server VM (build 24.80-b07, mixed mode)
then:
$sudo cp /usr/lib/jvm/java-7-oracle/include/*.h /usr/local/include/
$sudo cp /usr/lib/jvm/java-7-oracle/include/linux*.h /usr/local/include/
$sudo cp /usr/lib/jvm/java-7-oracle/jre/lib/i386/client/libjvm.so /usr/local/lib/
then:
i go to nsj from terminal and
saman@saman-Inspiron-1545:~/nsj$ ./install
then:i have that important notic that i mentioned in last post.
?
if i have something else please tell me.
thank you
 
Old 03-23-2015, 08:16 AM   #22
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
? Any particular reason for not doing
$ sudo apt-get install oracle-java6-installer
... See post #13.
Which will setup everything automatically.
Your post #21 only shows an attempt to do things as complicated as possible.


The only question you should have answered is :
"" Can you or can you not do $ sudo make install
in ns-2.35/ ? ""

-
 
1 members found this post helpful.
Old 03-23-2015, 11:09 AM   #23
samankarami
LQ Newbie
 
Registered: Feb 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
Exclamation

Quote:
Originally Posted by knudfl View Post
? Any particular reason for not doing
$ sudo apt-get install oracle-java6-installer

The only question you should have answered is :
"" Can you or can you not do $ sudo make install
in ns-2.35/ ? ""

-
my reason:
i cant do that because its forbidden for me!:
HTTP request sent, awaiting response... 403 Forbidden
2015-03-23 19:20:38 ERROR 403: Forbidden
download failed
Oracle JDK 6 is NOT installed.


i install ns2.35 separately but i need protolib and agentj then you propose post#5($ git clone https://github.com/mohaslan/nsj)
and after receive i have a folder with name nsj in home and i go to that address with terminal and write : ($export CC=gcc-4.4 CXX=g++-4.4 && ./install that you write for me in post#5.
may i have any mistake?or any thing that i forgot it?
now what is problem in this proccess?(installing)
 
Old 03-23-2015, 11:17 AM   #24
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Ref. post #23.

If you have ns-2.35/ns :
Run $ sudo make install
 
1 members found this post helpful.
Old 03-23-2015, 11:29 AM   #25
samankarami
LQ Newbie
 
Registered: Feb 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Ref. post #23.

If you have ns-2.35/ns :
Run $ sudo make install
in my nsj folder?
saman@saman-Inspiron-1545:~/nsj/ns-2.35$ sudo make install
for d in /usr/local/man/man1; do \
if [ ! -d $d ]; then \
mkdir -p $d ;\
fi;\

done
/usr/bin/install -c -m 755 ns /usr/local/bin
/usr/bin/install -c -m 644 ns.1 /usr/local/man/man1
what is it mean?

Last edited by samankarami; 03-23-2015 at 11:38 AM.
 
Old 03-23-2015, 11:43 AM   #26
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Quote:
In my nsj folder ?
You should know best what this thread is about ?
******** saman@saman-Inspiron-1545:~/nsj$ ./install

If you are working with "nsj" now :
It is a Yes : $ cd nsj/ns-2.35/ && sudo make install
 
1 members found this post helpful.
Old 03-23-2015, 11:48 AM   #27
samankarami
LQ Newbie
 
Registered: Feb 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post

It is a Yes : $ cd nsj/ns-2.35/ && sudo make install
i do and see this:
for d in /usr/local/man/man1; do \
if [ ! -d $d ]; then \
mkdir -p $d ;\
fi;\
done
/usr/bin/install -c -m 755 ns /usr/local/bin
/usr/bin/install -c -m 644 ns.1 /usr/local/man/man1
saman@saman-Inspiron-1545:~/nsj/ns-2.35$ sudo make install
for d in /usr/local/man/man1; do \
if [ ! -d $d ]; then \
mkdir -p $d ;\
fi;\
done
/usr/bin/install -c -m 755 ns /usr/local/bin
/usr/bin/install -c -m 644 ns.1 /usr/local/man/man1
what is it means?
 
Old 03-23-2015, 03:02 PM   #28
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Ref. #27.

The text in post #27 means that you are showing the usual OK install result twice.

The only thing that matters is that you now have /usr/local/bin/ns
... Which you can check with the 'which' command : $ which ns
 
1 members found this post helpful.
Old 03-23-2015, 03:58 PM   #29
samankarami
LQ Newbie
 
Registered: Feb 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Ref. #27.

... Which you can check with the 'which' command : $ which ns
after $ which ns i have /usr/local/bin/ns
but when i write ns i have this:
Error: Cannot open shared library: libagentj.so: cannot open shared object file: No such file or directory
????

Last edited by samankarami; 03-23-2015 at 05:55 PM.
 
Old 03-23-2015, 06:34 PM   #30
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Quote:
Error: Cannot open shared library: libagentj.so
You can do : $ sudo cp libagentj.so /usr/lib/
 
1 members found this post helpful.
  


Reply

Tags
agentj, ns2, protolib


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
protolib installation problem bluetooth Linux - Newbie 1 02-28-2011 09:08 AM


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