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 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] 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! |
What distro are you using?
|
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:
|
Quote:
|
Quote:
~/.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) 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? |
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 |
Why don't you just install jre from the repositories? That should take care of all the config issues.
|
Quote:
So the only way to install jre seems to be ./jre-6u14-linux-i586.bin |
Quote:
Btw, how do you deinstall a package which has been installed using .bin e.g. ./jre-6u14-linux-i586.bin ? |
Quote:
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 |
Quote:
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? |
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 |
|
Quote:
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... |
Quote:
Thanks. |
All times are GMT -5. The time now is 05:38 AM. |