LinuxQuestions.org
Review your favorite Linux distribution.
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 07-02-2009, 01:03 PM   #1
aurora72
Member
 
Registered: Jul 2009
Location: Türkiye
Distribution: Ubuntu 9.04 on IBM R31 thinkpad 512MB RAM shared VideoRAM, Intel i915 Graphics card 120GB HDD
Posts: 50

Rep: Reputation: 15
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!
 
Old 07-02-2009, 01:12 PM   #2
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 681

Rep: Reputation: 42
What distro are you using?
 
Old 07-02-2009, 01:17 PM   #3
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
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#
 
Old 07-02-2009, 02:35 PM   #4
aurora72
Member
 
Registered: Jul 2009
Location: Türkiye
Distribution: Ubuntu 9.04 on IBM R31 thinkpad 512MB RAM shared VideoRAM, Intel i915 Graphics card 120GB HDD
Posts: 50

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by rbees View Post
What distro are you using?
Sorry, out of hurry I've just forgotten: It's Ubuntu 8.10 on an R31 Thinkpad
 
Old 07-02-2009, 05:50 PM   #5
aurora72
Member
 
Registered: Jul 2009
Location: Türkiye
Distribution: Ubuntu 9.04 on IBM R31 thinkpad 512MB RAM shared VideoRAM, Intel i915 Graphics card 120GB HDD
Posts: 50

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by GrapefruiTgirl View Post
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?
 
Old 07-02-2009, 06:30 PM   #6
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
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
 
Old 07-02-2009, 06:32 PM   #7
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 681

Rep: Reputation: 42
Why don't you just install jre from the repositories? That should take care of all the config issues.
 
Old 07-03-2009, 05:26 AM   #8
aurora72
Member
 
Registered: Jul 2009
Location: Türkiye
Distribution: Ubuntu 9.04 on IBM R31 thinkpad 512MB RAM shared VideoRAM, Intel i915 Graphics card 120GB HDD
Posts: 50

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by rbees View Post
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
 
Old 07-03-2009, 05:45 AM   #9
aurora72
Member
 
Registered: Jul 2009
Location: Türkiye
Distribution: Ubuntu 9.04 on IBM R31 thinkpad 512MB RAM shared VideoRAM, Intel i915 Graphics card 120GB HDD
Posts: 50

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by GrapefruiTgirl View Post
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 ?
 
Old 07-03-2009, 09:56 AM   #10
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by aurora72 View Post
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
 
Old 07-03-2009, 11:07 AM   #11
aurora72
Member
 
Registered: Jul 2009
Location: Türkiye
Distribution: Ubuntu 9.04 on IBM R31 thinkpad 512MB RAM shared VideoRAM, Intel i915 Graphics card 120GB HDD
Posts: 50

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by GrapefruiTgirl View Post
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?
 
Old 07-03-2009, 12:00 PM   #12
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
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
 
Old 07-03-2009, 12:18 PM   #13
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 681

Rep: Reputation: 42
You might give this a look

http://wiki.debian.org/JavaPackage
 
Old 07-03-2009, 07:26 PM   #14
aurora72
Member
 
Registered: Jul 2009
Location: Türkiye
Distribution: Ubuntu 9.04 on IBM R31 thinkpad 512MB RAM shared VideoRAM, Intel i915 Graphics card 120GB HDD
Posts: 50

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by GrapefruiTgirl View Post
.....
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...
 
Old 07-03-2009, 07:38 PM   #15
aurora72
Member
 
Registered: Jul 2009
Location: Türkiye
Distribution: Ubuntu 9.04 on IBM R31 thinkpad 512MB RAM shared VideoRAM, Intel i915 Graphics card 120GB HDD
Posts: 50

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by rbees View Post
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.
 
  


Reply


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
how to install jre-6u11-linux-i586-rpm.bin sparulcse Linux - Software 1 12-27-2008 03:47 AM
how to uninstall jre-6u2-linux-i586.bin Muhammed Linux - Software 2 08-03-2007 01:34 PM
Unable to install java on Fedora Core 6, jre-6-linux-i586-rpm.bin dragoncorp.org Linux - Software 1 04-09-2007 11:33 PM
jre-6-linux-i586.bin DSL Rob G Linux - Software 1 03-21-2007 12:04 AM
chmod a+x jre-1_5_0-linux-i586-rpm.bin chemichael Fedora 4 09-24-2005 11:23 AM


All times are GMT -5. The time now is 07:18 AM.

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