LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't manage to install jre-6u14-linux-i586.bin locally (https://www.linuxquestions.org/questions/linux-newbie-8/cant-manage-to-install-jre-6u14-linux-i586-bin-locally-737232/)

aurora72 07-02-2009 12:03 PM

Can't manage to install jre-6u14-linux-i586.bin locally
 
Hello,

I've just downloaded jre-6u14-linux-i586.bin from Sun's website into /home/{UserNAme}/Documents/debs/binary/ and run
Code:

./jre-6u14-linux-i586.bin
. and it started to install it smoothly e.g. it started by printing

Sun Microsystems, Inc. Binary Code License Agreement for the JAVA SE RUNTIME ENVIRONMENT...

Then printing

Code:

Do you agree to the above license terms? [yes or no]
y
Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
...


till it prints "done" and it's done. But that action results mainly in formation of Java related files and directories
directly under the directory in which the installation has taken place, i.e. under /home/{UserNAme}/Documents/debs/binary/
and consequently the jre just doesn't work.

So what should I do to both install jre from its .bin package file and make it work? Any basic advice regarding forming a local repository system is welcome.

Thanks!

rbees 07-02-2009 12:12 PM

What distro are you using?

GrapefruiTgirl 07-02-2009 12:17 PM

It likely works just fine, but you may need to set the $JAVA_HOME (and maybe an/other) environment variables to point to where the Java executables are.

For example, if I type the env command, I see this (among others):
Code:


sh-3.1# env | grep J
JAVA_HOME=/usr/lib/jvm
sh-3.1#


aurora72 07-02-2009 01:35 PM

Quote:

Originally Posted by rbees (Post 3594520)
What distro are you using?

Sorry, out of hurry I've just forgotten: It's Ubuntu 8.10 on an R31 Thinkpad

aurora72 07-02-2009 04:50 PM

Quote:

Originally Posted by GrapefruiTgirl (Post 3594526)
It likely works just fine, but you may need to set the $JAVA_HOME (and maybe an/other) environment variables to point to where the Java executables are.

For example, if I type the env command, I see this (among others):
Code:


sh-3.1# env | grep J
JAVA_HOME=/usr/lib/jvm
sh-3.1#


That sounds fine, I mean setting the $JAVA_HOME and $PATH variables in
~/.bash_profile seems to be the right direction. However setting the following variables (which I 've just seen in a tutorial)

export JAVA_HOME=/{path to java files}/jdk1.6.0_14/bin/java
export PATH=$PATH:/{path to java files}/jdk1.6.0_14/bin

and after saving, loggin out and re-logging it is said to be ok but still it's not. I guess I know why it's not.

Well, my main application to be installed is LimeWire and the installation package (LimeWireLinux.deb, freshly downloaded from LimeWire's website) after dpkg -i LimeWireLinux.deb gives the following answer:

Code:

Preparing to replace limewire-basic 5.1.4-1 (using LimeWireLinux.deb)
....
dpkg: dependency problems prevent configuration of limewire-basic:

 limewire-basic depends on sun-java6-jre | icedtea-java7.jre | sun-java6-jdk | icedtea-java7.jdk; however,:
Package sun-java6-jre is not installed
Package icedtea-java7.jre is not installed
Package sun-java6-jdk is not installed
Package icedtea-java7.jdk is not installed
...
dependency problems leaving unconfigured

I currently have both jre-6u14-linux-i586.bin and jdk-6u14-linux-i586.bin and I guess I'll have to download icedtea-java7.jre and icedtea-java7.jdk, too. But before going further, one question is here:

after these lines at ~/.bash_profile

export JAVA_HOME=/{path to java files}/jdk1.6.0_14/bin/java
export PATH=$PATH:/{path to java files}/jdk1.6.0_14/bin

shall I also add lines like

export JAVA_HOME=/{path to java files}/jre1.6.0_14/bin/java
export PATH=$PATH:/{path to java files}/jre1.6.0_14/bin

for the jre installation?

GrapefruiTgirl 07-02-2009 05:30 PM

Those messages from dpkg are telling you that you need ONLY ONE of those java packages installed. The pipe symbol | <-- means 'or'. So "A | B | C" means "A or B or C".

As far as the exporting of the variables and what to add (or not) to your .bash_profile to satisfy dpkg's dependency issues, I'm not sure at all. Someone with some experience configuring dpkg would perhaps be able to give more help on that.

But for exporting, remember that each time you export a variable, it overwrites what it last was set to. You can't export two different things to one variable. The $PATH you can append to, that's no problem, but $JAVA_HOME can only be one item.

Sasha

rbees 07-02-2009 05:32 PM

Why don't you just install jre from the repositories? That should take care of all the config issues.

aurora72 07-03-2009 04:26 AM

Quote:

Originally Posted by rbees (Post 3594855)
Why don't you just install jre from the repositories? That should take care of all the config issues.

Not so much sure about it but in order to install a package from repositories, I guess I must be able to handle the package by dpkg , is that right? But because Sun has published the jre as a .bin file I cannot handle it by dpkg. (It says .bin is not a debian package format)

So the only way to install jre seems to be ./jre-6u14-linux-i586.bin

aurora72 07-03-2009 04:45 AM

Quote:

Originally Posted by GrapefruiTgirl (Post 3594853)
Those messages from dpkg are telling you that you need ONLY ONE of those java packages installed. The pipe symbol | <-- means 'or'. So "A | B | C" means "A or B or C".

As far as the exporting of the variables and what to add (or not) to your .bash_profile to satisfy dpkg's dependency issues, I'm not sure at all. Someone with some experience configuring dpkg would perhaps be able to give more help on that.

But for exporting, remember that each time you export a variable, it overwrites what it last was set to. You can't export two different things to one variable. The $PATH you can append to, that's no problem, but $JAVA_HOME can only be one item.
Sasha

That's right i.e. installing only one Java package must suffice. but even after properly installing jre (using the command ./jre-6u14-linux-i586.bin) and re-editing the .bash_profile so that $PATH and $JAVA_HOME point to the jre, the result is the same: Trying to install dpkg -i LimeWireLinux.deb results in "dependency problems - leaving unconfigured"

Btw, how do you deinstall a package which has been installed using .bin e.g. ./jre-6u14-linux-i586.bin ?

GrapefruiTgirl 07-03-2009 08:56 AM

Quote:

Originally Posted by aurora72 (Post 3595316)
Btw, how do you deinstall a package which has been installed using .bin e.g. ./jre-6u14-linux-i586.bin ?

Usually one of two ways, depending on exactly what-all the package does when it installs.

In the case of this java .bin file, I believe everything it does is pretty much contained within the folder where you execute it. Therefore the bulk of what it created can simply be deleted, and it's uninstalled.

Alternately, these self-extracting .bins often have --parameters you can give to them, such as --help or --remove or --uninstall or --extract. Extract can be particularly useful, if it exists, because it gives you access to any documentation that may be contained within.

Sorry I can't help further with the dependency mess you are looking at :( but the earlier poster (rbees) suggested you install jre from the repo, and that is a good idea, though you *may* still have some fiddling to do if you go that route, because you want the java to be installed 'locally' and I'm not sure how the dpkg tool will like doing that (I don't use dpkg).
The repository version of the jre will be the same stuff that is contained within the .bin file that you are using, only the package-maker would have extracted the .bin and re-packaged it as a .deb for use by dpkg.

Hope this helps some more...

Sasha

aurora72 07-03-2009 10:07 AM

Quote:

Originally Posted by GrapefruiTgirl (Post 3595550)
Usually one of two ways, depending on exactly what-all the package does when it installs.

In the case of this java .bin file, I believe everything it does is pretty much contained within the folder where you execute it. Therefore the bulk of what it created can simply be deleted, and it's uninstalled.

Alternately, these self-extracting .bins often have --parameters you can give to them, such as --help or --remove or --uninstall or --extract. Extract can be particularly useful, if it exists, because it gives you access to any documentation that may be contained within
...

Well yes, simply deleting the folders (created by the .bin installation) works.

Now, after looking at the problem once more, I 'm starting to see where it might be going wrong, it may have more to do with the location of java, "#whereis java" returns /usr/share/java and that location is totally irrelevant to the location of my java I installed.

So, as part of general rearrangement I have uninstalled all jdk&jre installations and installed them under /usr/local/lib. That's the location suggested by a documentation by Sun. (I have also re-edited the .bash_profile accordingly)

Now I'm trying to make "#whereis java" return
/usr/local/lib/jdk1.6.0_14/bin/java and not /usr/share/java
How to do that?

GrapefruiTgirl 07-03-2009 11:00 AM

I'm not sure; if I can figure out another way than what I propose here, I'll let you know. In the meantime, try something:

Check if there are any symlinks involved here; for example, is /usr/share/java actually a symlink to somewhere else?

The 'whereis' command shows the locations of the binary, source, and executable, for a command. So there must be something 'java-esque' in /usr/share/java.

What if you symlink /usr/local/lib/jdk1.6.0_14/bin/java to /usr/share/java instead? Maybe that will work. So, if /usr/share/java is not actually being used, and is not what you want, delete it (or for safety, rename it for now), and then do:

ln -s /usr/local/lib/jdk1.6.0_14/bin/java /usr/share/java

This may be not the ideal or really correct way to go about this, but if it works until you get better advice, I guess it isn't too bad.
I did have to do some finagling when I installed the jre/jdk on my machine too; I did some shuffling of locations, some symlinking, and eventually it all came together.

Good luck,
Sasha

rbees 07-03-2009 11:18 AM

You might give this a look

http://wiki.debian.org/JavaPackage

aurora72 07-03-2009 06:26 PM

Quote:

Originally Posted by GrapefruiTgirl (Post 3595674)
.....
What if you symlink /usr/local/lib/jdk1.6.0_14/bin/java to /usr/share/java instead? Maybe that will work.
Good luck,
Sasha

Thank you for the suggestion but renaming /usr/share/java and
ln -s /usr/local/lib/jdk1.6.0_14/bin/java /usr/share/java

looked good in terms of persuading Linux to look for the Java files in
/usr/local/lib/jdk1.6.0_14 but unfortunately it did have no effect in my machine.

Btw, the "java" in /usr/share/java is a directory and contains only a file named libintl.jar.

Isn't there a way to add a new path / delete the current one (which is /usr/share/java)so that "whereis java" returns "/usr/local/lib/jdk1.6.0_14/bin/java"? That being asked, I'm actually not
sure "whereis java" returning the desired path/filename will solve this Java dependency problem...

aurora72 07-03-2009 06:38 PM

Quote:

Originally Posted by rbees (Post 3595696)
You might give this a look

http://wiki.debian.org/JavaPackage

That solution (integrating several .bin packages into a .deb file) seems to require that you're an intermediate Linux user at first. But tomorrow I 'll give it a try.

Thanks.


All times are GMT -5. The time now is 05:38 AM.