LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-02-2007, 01:22 PM   #1
saturnine
LQ Newbie
 
Registered: Aug 2006
Posts: 8

Rep: Reputation: 0
Java Runtime Environment 1.6.0_01 not working in Debian


Hi,

I'm trying to get JRE 1.6.0_01 to work in my Debian 2.6.17-2-k7 (testing/unstable).

I've unpacked and compiled JRE and copied it in the /usr/bin-directory.

When I say "java" in the command line this is what I get:

java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory

Does this mean that java isn't in the PATH? How do I put it there?

Thanks!

saturnine
 
Old 05-02-2007, 01:35 PM   #2
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Why didn't you install that from the repositories? It's just so much easier. Just go to System > Administration > Synaptic Package Manager and select the Sun jre or jdk.

Then you may still need to set JAVA(orJRE) home:

echo JAVA_HOME=/path/to/jre >> /etc/profile (substitute with JRE_home as required)
echo export JAVA_HOME >> /etc/profile (substitute as required)
source /etc/profile

Then if as root you do

echo $JAVA(or JRE)_HOME

it should return the path to your JRE/JDK.

If you do

java -version

it should return the version of the jdk/jre currently installed.

Last edited by jay73; 05-02-2007 at 01:37 PM.
 
Old 05-02-2007, 02:38 PM   #3
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
Quote:
my Debian 2.6.17-2-k7 (testing/unstable)
Not sure how you're running that kernel in testing-unstable. The current kernel in Testing is 2.6.18-4 and in Unstable it's 2.6.20-1. It amazes me how many people still haven't realized that Stable and Tesing are not the same as they were a few weeks ago. That lack of knowledge can lead to a lot of problems for people trying to find packages in the Debian archives.
 
Old 05-02-2007, 03:22 PM   #4
saturnine
LQ Newbie
 
Registered: Aug 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks for the reply Jay,

I've used apt-get several times, but here's the thing: I'm trying to install a software called Jin.
(http://www.jinchess.com/) It requiers the original version of Java, not the implemention.

When I do

./jin

this is what I get:

You seem to be running GNU's Java implementation, which is incomplete.
Jin requires Sun's Java (or a fully compatible version) 1.4 or later.
If you can't install it with your distribution's package manager, you
can obtain and install it manually from http://www.java.com

So that's why.. any good ideas? I'm all out.

--
saturnine
 
Old 05-02-2007, 05:38 PM   #5
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
apt provides a very simple solution to that problem, but I think you should first post your /etc/apt/sources.list file so we can make sure what we are dealing with here.
 
Old 05-02-2007, 05:40 PM   #6
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Exactly, you really need the package called sun-jdk-(?).
 
Old 05-03-2007, 01:27 AM   #7
saturnine
LQ Newbie
 
Registered: Aug 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks again, you both!

Here's my /etc/apt/sources.list

deb http://ftp.fi.debian.org/debian/ testing main non-free contrib
deb-src http://ftp.fi.debian.org/debian/ testing main non-free contrib

deb http://security.debian.org/ testing/updates main
deb-src http://security.debian.org/ testing/updates main

deb ftp://ftp.nerim.net/debian-marillat sid main

deb http://http.us.debian.org/debian/ experimental main contrib non-free
deb http://http.us.debian.org/debian/ unstable main contrib non-free
deb http://security.debian.org/ testing/updates main

saturnine
 
Old 05-03-2007, 01:34 AM   #8
saturnine
LQ Newbie
 
Registered: Aug 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Jay73,

Got the sun-java6-jdk package. Still getting the same error from Jin.

saturnine
 
Old 05-03-2007, 03:28 AM   #9
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Hmm, for all I know it could simply be that JIN (not familiar with it) is lagging and does not support jdk6 yet. I had a similar problem using webworks (and perharps Spring as well, I don't remember). See what happens if you use jdk5 instead.
 
Old 05-03-2007, 07:16 AM   #10
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
First a little housekeeping. Unless you know what you're doing, that's a pretty ugly sources.list file. Do you have an /etc/apt/apt.conf file? If yes, what's in it?

If no, get the duplications out of there. Assuming you live in the US, it should look something like this:
Quote:
deb http://ftp.us.debian.org/debian/ testing main non-free contrib
deb-src http://ftp.us.debian.org/debian/ testing main non-free contrib

deb http://security.debian.org/ testing/updates main
deb-src http://security.debian.org/ testing/updates main

deb http://www.debian-multimedia.org testing main

#deb http://http.us.debian.org/debian/ experimental main contrib non-free
#deb http://http.us.debian.org/debian/ unstable main contrib non-free
If you live in Finland, change "us" to "fi" in the top two lines.
debian-marillat has changed its name to debian-multimedia.
Notice I have commented out the Sid and Experimental repos. Normally you choose only one (Testing, in this case). The effect of having the multiple is that any upgrade you do will be pulled from the least stable repository. If you specifically need something from Sid or Experimental, you can temporarily uncomment that line, get the needed package, then replace the comment. Any time you change that file, you have to run an "update."

**********
Now, back to the original question. What is now the output of $ java -version

Last edited by rickh; 05-03-2007 at 07:17 AM.
 
Old 05-03-2007, 03:10 PM   #11
saturnine
LQ Newbie
 
Registered: Aug 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Housekeeping tips are something I'm always open for! And yes, you assumed right, I pretty much don't know what I'm doing.. Well, that's why I'm here. A friend of mine helped me to install Debian but I'm tired of bothering him all the time.

Here's my /etc/apt/apt.conf:

APT::Authentication::TrustCDROM "true";
Acquire::::Proxy "false";

And "java -version" gives me this:

java version "1.4.2"
gij (GNU libgcj) version 4.0.3 20051204 (prerelease) (Debian 4.0.2-5j2)


--
saturnine

 
Old 05-03-2007, 04:30 PM   #12
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
Quote:
java version "1.4.2"
gij (GNU libgcj) version 4.0.3 20051204 (prerelease) (Debian 4.0.2-5j2)
OK. Make your sources.list file look like the one I gave you, then:
# aptitude keep-all
# aptitude update
# aptitude install sun-java6-jre

Then run $ java -version again

You should see a significant change.
 
Old 05-04-2007, 01:31 AM   #13
saturnine
LQ Newbie
 
Registered: Aug 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Hi,

did all that and still there's no change.

$aptitude update

gives some errors:

W: Couldn't stat source package list http://www.debian-multimedia.org
testing/main Packages
(/var/lib/apt/lists/www.debian-multimedia.org_dists_testing_main_binary-i386_Packages)
- stat (2 No such file or directory)
W: You may want to update the package lists to correct these missing files
W: GPG error: http://www.debian-multimedia.org testing Release: The
following signatures couldn't be verified because the public key is not
available: NO_PUBKEY 07DC563D1F41B907
W: GPG error: http://ftp.fi.debian.org testing Release: The following
signatures couldn't be verified because the public key is not available:
NO_PUBKEY A70DAF536070D3A1
W: GPG error: http://security.debian.org testing/updates Release: The
following signatures couldn't be verified because the public key is not
available: NO_PUBKEY A70DAF536070D3A1
W: You may want to run apt-get update to correct these problems

And when I say apt-get update it gives the same errors..

$java -version still brings the same text as it did before.

--
saturnine
 
Old 05-04-2007, 01:40 AM   #14
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
Quote:
$java -version still brings the same text as it did before.
If you have errors, you can't just keep plugging on and expect to get results. You first have to clear the errors.

For each of the "PUBKEY" errors, do this.

# gpg --keyserver wwwkeys.eu.pgp.net --recv-keys XXXXXXXXXXXXXXXX
# apt-key add /root/.gnupg/pubring.gpg

Replace XXXXXXXXXXXXXXXX with the key given in the error message.

When you've done them all, try "# aptitude update" again
 
Old 05-05-2007, 05:28 AM   #15
saturnine
LQ Newbie
 
Registered: Aug 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by rickh
If you have errors, you can't just keep plugging on and expect to get results. You first have to clear the errors.
Of course. I just didn't have a clue what to do with the pubkey thing.

I did what you adviced with the pubkeys, it worked. "Aptitude update" doesn't bring any errors now. When I run "aptitude install sun-java6-jre", it doesn't install any new packages because sun-java6-jre is already installed.

So, should I first remove it and then install it again? Can I remove it using aptitude and if yes, then how?

Thanks a bunch, I should maybe start paying you something for helping me this much.

saturnine
 
  


Reply



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
Java Programming: Java Runtime Environment not found when trying to compile murbz Linux - Software 2 03-26-2009 03:04 AM
Java Runtime Environment - Debian Grimmi- Linux - Software 2 09-23-2006 01:32 AM
Java Runtime Environment (Debian/FireFox) nutnut Linux - Software 2 10-28-2005 06:58 PM
using debian .. how do i get java runtime environment? pinkfae222 Linux - Newbie 3 07-15-2005 11:49 PM
Java Runtime Environment J_Szucs Linux - Newbie 6 02-18-2002 06:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:37 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
Open Source Consulting | Domain Registration