LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   Installing Azureus (https://www.linuxquestions.org/questions/mandriva-30/installing-azureus-319951/)

duffmckagan 05-04-2005 03:30 AM

Installing Azureus
 
I have Mandrake 10.1 and I want to install Azureus.

I installed the Java -->jre-1_5_0_01-linux-i586-rpm.bin

I entered it this way.

Using the cd command, i went to that directory, and then did ./jre-1_5_0_01-linux-i586-rpm.bin

After this it created an rpm file in the same directory.

I installed that too using

rpm -iv jre-1_5_0_01-linux-i586-rpm

then it gave me some error saying that input-output error, (it was related for it's inability to unmount a share).....>>I wonder that it is related to the rpm installation.

Then it halted for about 30 secs, and then it got fine.

I am a newbie, I don't know whether after installation I should have got a message sayin that Installation complete etc.........>>>I did not get anything like that.

I downloaded the Azureus.jar, from the site.

Now i wonder whether it is the appropriate version , or I should have downloaded something else.

Please guide me for Installing Azureus.

Also tell me I have done a proper install of Java or not, if yes, how do i check that!

frostschutz 05-04-2005 04:01 AM

I don't know Mandrake, but installing stuff manually if you don't know what you're doing is almost never a good idea. Your distro should have a package management system (like apt-get in Debian or emerge in Gentoo or yast in Suse...) which takes care of all dependencies (like installing a Java Runtime Environment for Azureus).

prj 05-04-2005 04:20 AM

To check Java is installed properly just type
Code:

java -version
at a command prompt.

Result should be similar to as below except in your case with 1.5.0.01 as the version.
Code:

prj@elinmai:~> java -version
 java version "1.4.2_06"
 Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
 Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)

If this doesn't work right you may need to add Java to your path.

duffmckagan 05-04-2005 04:23 AM

Yeah, there is something called Mandrake control Center in Mandrake.

But when i searched for Java, no results were found, and so thought of manually Installing that stuff.

duffmckagan 05-04-2005 05:18 AM

I did not get the message that you have mentioned.

So it means that Java is not installed properly?

>>>>If this doesn't work right you may need to add Java to your path.

What does this mean?

reddazz 05-04-2005 05:39 AM

Do the following,
[list=1][*]Start a console session and switch to root using "su -"[*]Change into /etc/profile.d e.g.
Code:

#cd /etc/profile.d
[*]make a file called java.sh e.g.
Code:

#emacs java.sh
[*]copy and paste the code below
Code:


#!/bin/sh
export JAVA_HOME=/opt/java
export MANPATH="$MANPATH:/opt/java/man"
export PATH="$PATH:/opt/java/bin"

[*]Save the file and make it executable e.g.
Code:

#ctrl-x ctrl-s
#chmod +x java.sh

[*]create a symlink to your java directory into /opt .e.g.
Code:

#ln -s /usr/java/jre-version /opt/java
[*]log out and in again and java should be working ok for all users.[/list=1]

There are other ways of configuring your java path, but I prefer this method becaus it makes java accessible to everyone. Just remember to update your symlink if you upgrade java.

duffmckagan 05-04-2005 07:34 AM

NOw, whenever I open console, I get this message.

bash: export: `MANPATH-:/opt/java/man': not a valid identifier


Now what has gone wrong?

reddazz 05-04-2005 07:39 AM

Edit the script and remove or comment out the export MANPATH="$MANPATH:/opt/java/man". I wrote it for the jdk so maybe the jre doesn't have the manual. Before doing that does "java -version" print out the java version?

duffmckagan 05-04-2005 09:00 AM

NO, It does not.

prj 05-04-2005 09:05 AM

/opt may not be where your Java install resides.

Which directory is it in?

duffmckagan 05-04-2005 09:30 AM

Sorry I don't know where it is.

I have a problem with the Find Option too.......It gets stuck up.

I don't know what is it happening. .....so i can't find my java too.

I have mentioned what I exactly did in my first post.

Maybe that helps.

PerfectReign 05-04-2005 09:40 AM

Do yourself a favor - do an RPM search.

A quick search at Pbone got me this for your distro:

http://www.pbone.net/index.php3/stat....i586.rpm.html

Installing an RPM of java,written for your distro will be much easier.

Yes, it can be done from the Sun downloads, but you have to update the path and know what you're doing. I munged through it in about twenty minutes, but that's only because I did the same in Windows recently. If you install manually, y ou'll have to update the PATH statement, and that's not easy in Linux. (It isn't supposed to be easy,either.)

reddazz 05-04-2005 09:41 AM

Quote:

Originally posted by duffmckagan
NO, It does not.
If java does not return a version then I am sure you made an error in creating the symlink I suggested. Look in /opt, if there is a file called java delete it. Create a symlink as in step 6 above with the right jre version e.g.
Code:

#ln -s /usr/java/jre-1.5.0_01/ /opt/java
Check in /usr/java for the right path to your jre. When thats done, log out and back in again. Hopefully this time it will work properly.

duffmckagan 05-04-2005 09:53 AM

I logged in as root and then went to

/opt

Now there was a file called java as you told me Reddazz.

Now, I deleted it.

When I tried to create a symlink , it told me that the specified file already exists.

So, do i now need to delete the one in /usr/bin?

One more thing.
the java does exist in /usr/java

reddazz 05-04-2005 10:12 AM

No you need to delete the one in /opt. Do as root "rm -rf /opt/java" and then recreate the symlink using the instructions in my previous post. What is the version of java in /usr/java. If I have the exact version I can rewrite the script so that you don't have to mess around with creating the symlink if you keep having problems.

duffmckagan 05-04-2005 10:20 AM

It was done with no errors.

And yes, I have the same version of Java as you have mentioned above.

I deleted the /opt/java file, with the rm option at command line and recreated the symlink as specified........With no errors.

But, still the above mentioned line:
bash: export: `MANPATH-:/opt/java/man': not a valid identifier

comes again and again.......

reddazz 05-04-2005 11:16 AM

And did you try commenting out export MANPATH="$MANPATH:/opt/java/man" from the java.sh script or deleting it. If that fails delete the java.sh file and create an entry similar to the one below in your .bash_profile
Code:

export PATH=$PATH:/usr/java/jre1.5.0_01/bin
That will put java in the path of the current user, but you will have to do this for everyone who uses the system. I have asked several times for the exact version of java you are using (as it is in /usr/java) but you haven't responded to that.

duffmckagan 05-04-2005 11:28 AM

Quote:

Originally posted by reddazz
I have asked several times for the exact version of java you are using (as it is in /usr/java) but you haven't responded to that. [/B]

Sorry that you couldn't find this in my previous Post.
I should have put the number instead of the sentence.

Quote:

Originally posted by duffmckagan
And yes, I have the same version of Java as you have mentioned above.

Should i compile that code you have mentioned above again?

If yes, then I will shell out those lines....I need just a yes or no.

reddazz 05-04-2005 11:37 AM

You need to delete the /etc/profile.d/java.sh and then try the instructions in my last post.

duffmckagan 05-04-2005 11:51 AM

I will do that.....

BUt I still don't get the java version and the code told above.....after compiling.

java -version

in root as well as in user modes.

Is it appropriate to do that even though I don't get it?

prj 05-04-2005 12:07 PM

reddazz, having made the script "java.sh" in /etc/profile.d I presume it needs to be run to set the paths correctly?

or reboot to run it that way?

As root:

cd /etc/profile.d
./java.sh

duffmckagan 05-04-2005 12:20 PM

./java.sh: line 3: export: `MANPATH-:/opt/java/man': not a valid identifier

I got this error for that

cd /etc/profile.d
./java.sh

I believe I have to re compile everything that reddazz has mentioned before, excluding the
exporting Man path stuff.

prj 05-04-2005 12:41 PM

Code:

MANPATH-:/opt/java/man
Shouldn't that be
Code:

MANPATH=/opt/java/man
:scratch:

reddazz 05-04-2005 01:15 PM

If you log out and in again, the scripts in /etc/profile.d are automatically run, so there is no need to run them as "./java.sh". You can also do "source .bash_profile" if you don't want to log out. I have said to uncomment the manpath line, but I am not sure thats been done because bash shouldn't complain about this if its not set. Mine is like below and it works fine using the jdk,

Code:

#!/bin/sh
export JAVA_HOME=/opt/java
export MANPATH="$MANPATH:/opt/java/man"
export PATH="$PATH:/opt/java/bin:/opt/java/jre/bin"

If using the jre, I am sure the one below would work if the jre doesn't have a manual,
Code:

#!/bin/sh
export JAVA_HOME=/opt/java
export PATH="$PATH:/opt/java/bin"

Try changing the /opt/java to your actual java path.

mrcheeks 05-04-2005 01:45 PM

Quote:

Originally posted by duffmckagan
I logged in as root and then went to

/opt

Now there was a file called java as you told me Reddazz.

Now, I deleted it.

When I tried to create a symlink , it told me that the specified file already exists.

So, do i now need to delete the one in /usr/bin?

One more thing.
the java does exist in /usr/java

Why don't/didn't you replace /opt/java by /usr/java in the reddazz script?

duffmckagan 05-04-2005 11:45 PM

I have a folder named jre1.5.0_01in the /usr/java folder.

SHould i run the script again?

Moreover, If i should start from scratch, How should i do it?

there is nothing like java in /opt anymore.

If i hav done anything too wrong, How can i just delete everything, and follow the reddazz script to a successful install?

Moreover, I see that i have Jre....and not JDK.....

I don't know any development things, so JRE would be OK for me.

Still, i can download JDK if you prefer.

Plz provide the LInk.

reddazz 05-05-2005 03:17 AM

Try the one below,

Code:

#!/bin/sh
export JAVA_HOME=/usr/java/jre1.5.0_01
export PATH="$PATH:/usr/java/jre1.5.0_01/bin"


duffmckagan 05-05-2005 03:43 AM

Where should I try it?
Emacs or Konsole?

reddazz 05-05-2005 08:15 AM

Thats a script that has to go into /etc/profile.d following the procedure in my first post.

duffmckagan 05-05-2005 08:44 AM

Now there has been a problem .
I don't get the root prompt at the command line.....instead i get this.
When i type su- and root password , this is what i get.

-bash: !/bin/sh: No such file or directory
-bash-2.05b#


now, when i test whether java is installed by running

java -version, i get the proper results......As mentioned by.......PRJ earlier.

How do i fix this?

reddazz 05-05-2005 08:49 AM

On most systems /bin/sh is a symlink to /bin/bash. If you are having such a problem then change #!/bin/sh to #!/bin/bash in the script.

duffmckagan 05-05-2005 09:39 AM

Now my problem has worsened.

I made the specified changes in the script.

I changed the /bin/sh to /bin/bash .

But the new error occurred this time saying problem with bash.

I thought of loggin off and in.....

Now whatever i did , i couldn't login.

Now what should I do.

I thought that starting from scratch would be a good Idea, and has talked about it before.

Please rescue me guys.

reddazz 05-05-2005 10:13 AM

Something is wrong with your system if it can't find bash. The same script works fine on a Mandriva test system I just setup. Anyway what happens when you try to login as your normal user or as root.

duffmckagan 05-05-2005 11:06 AM

Maybe the problem is enabling the login for root.

I just tweaked some settings to unhide root..........(So that I could Login as root).

But that can't be the reason for my problem I suppose.

I restart 2 times, but couldn't login.

When i try to login, and enter the password, it accepts it just fine, and then seems like it is entering my account.....but then a black screen comes in for a sec and then ......I am back again at the login screen.

Is this related with the bash thing, or with unhiding the root?

I don't often restart my system.

It goes on for weeks.

Can this be a problem?:confused:

reddazz 05-05-2005 11:35 AM

I am not sure what could be causing that. Adding an aditional path shouldn't be a show stopper. I don't really know how else to help you. I am sure you can login again as a normal user if you get rid of the script.

duffmckagan 05-05-2005 11:45 AM

I will try rebooting to Mandrake again tomorrow.

It is late night here right now.

Hold on. :)

duffmckagan 05-06-2005 09:01 AM

Hey reddazz and all of you.

Thanks for your help until now.
You don't know how grateful I am for your time you have give me!

Now the problem again.

I tried rebooting to Mandrake this morning, but to no avail.

Somehow, I managed to get to the command line, but then what do i do to get rid of the script?

I tried the rm and rmdir command, but no use as it can only delete empty directories.


HOW DO I GET RID OF THAT SCRIPT?

reddazz 05-06-2005 11:27 AM

rm can remove files "rm /etc/profile.d/java.sh" as root should do the trick.

duffmckagan 05-06-2005 12:27 PM

Great.

That was really the show stopper.

I removed it and everything workin fine. (Except Java).

Now again! :cry: :cry:

duffmckagan 05-06-2005 03:09 PM

Hey Reddazz this is the last time for installing JAVA.

Can you please arrange the exact process I need to follow now?

I don't understand exactly how to use emacs.

In your first post, what is that ctrl-x and ctrl-s thing?
and that chmod thing?

Where do i type that?

Please tell me exact procedure for emacs, as I don't know how to use it.

I am and will be grateful for your every post!

reddazz 05-07-2005 02:21 AM

If you are not sure how to use apps or commands on Linux (or other Unix like OSes) just do "man program/command" e.g. "man emacs". Man is short for manual. Anyway emacs is a text editor that can be used in graphical or text mode. Other common ones are vi/vim and pico/nano. chmod (change mode) changes permissions on a file etc. All those commands are entered in a console.

One other possible solution is to do the following as root,
Code:

#ln -s /usr/java/jre1.5.0_01/bin/java /usr/bin/java
That will create a symlink to java. Hope that works.

prj 05-07-2005 03:24 AM

For people like myself who have come from a windows background perhaps and like to do alot of things from the GUI environment you could always do the following.

To make the link:

As root, bring up two file managers (Konqueror or whatever you use),
or if using KDE as your normal login you can bring up two in "super user" mode from Menu > System > File manager > File Manager(super user mode).
In one navigate to /usr/java/jre1.5.0_01/bin.
In the other navigate to /usr/bin.
Drag the java file from /usr/java/jre1.5.0_01/bin across to /usr/bin.
From the dialogue that comes up choose "link".


To create script:

To create your script use one of the File Managers as above (still need to be super user or root) to navigate to /etc/profile.d.
Right click in a clear patch in the directory and choose "Create new" > "Text file".
Name it "java.sh", without the quotes!
Right click on the file you have created and from the menu choose "open with" > choose an editor from list.

Just type in the lines as reddazz showed and then save.

What ever you do dont use a word processor instead of an editor as this may introduce odd formatting characters into the script!

Good Luck


All times are GMT -5. The time now is 06:38 PM.