LinuxQuestions.org
Visit Jeremy's Blog.
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 06-22-2006, 04:35 PM   #1
fault
Member
 
Registered: Sep 2004
Distribution: Archlinux
Posts: 30

Rep: Reputation: 17
Java installing issue using apt


Hello there.
I'm using Ubuntu dapper. Recently I tried to install Java using the apt programm. But it gives me these lines which i dont know what to do on:
Code:
fault@fault:~$ sudo apt-get install sun-java5-jdk
Reading package lists... Done
Building dependency tree... Done
You might want to run Ďapt-get -f installí to correct these:
The following packages have unmet dependencies.
  sun-java5-demo: Depends: sun-java5-jre (= 1.5.0-06-1) but it is not going to be installed
  sun-java5-jdk: Depends: sun-java5-jre (= 1.5.0-06-1) but it is not going to be installed
E: Unmet dependencies. Try Ďapt-get -f installí with no packages (or specify a solution).
Ok, then I do:
Code:
fault@fault:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree... Done
Correcting dependencies...Done
The following extra packages will be installed:
  sun-java5-bin sun-java5-jdk sun-java5-jre
Suggested packages:
  sun-java5-doc sun-java5-source sun-java5-plugin ia32-sun-java5-plugin sun-java5-fonts
The following NEW packages will be installed
  sun-java5-bin sun-java5-jdk sun-java5-jre
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
Need to get 0B/34.5MB of archives.
After unpacking 95.2MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Preconfiguring packages ...
(Reading database ... 109362 files and directories currently installed.)
Unpacking sun-java5-bin (from .../sun-java5-bin_1.5.0-06-1_i386.deb) ...
sun-dlj-v1-1 license could not be presented
dpkg: error processing /var/cache/apt/archives/sun-java5-bin_1.5.0-06-1_i386.deb (--unpack):
 subprocess pre-installation script returned error exit status 2
Unpacking sun-java5-jre (from .../sun-java5-jre_1.5.0-06-1_all.deb) ...
sun-dlj-v1-1 license could not be presented
dpkg: error processing /var/cache/apt/archives/sun-java5-jre_1.5.0-06-1_all.deb (--unpack):
 subprocess pre-installation script returned error exit status 2
Unpacking sun-java5-jdk (from .../sun-java5-jdk_1.5.0-06-1_i386.deb) ...
sun-dlj-v1-1 license could not be presented
dpkg: error processing /var/cache/apt/archives/sun-java5-jdk_1.5.0-06-1_i386.deb (--unpack):
 subprocess pre-installation script returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/sun-java5-bin_1.5.0-06-1_i386.deb
 /var/cache/apt/archives/sun-java5-jre_1.5.0-06-1_all.deb
 /var/cache/apt/archives/sun-java5-jdk_1.5.0-06-1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
What does it say? What do I have to do?
Thanks in advance. -fault

Last edited by fault; 06-22-2006 at 04:37 PM.
 
Old 06-22-2006, 06:28 PM   #2
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
I have had nothing but trouble trying to install java from the Debian repos. I've gone back to the old fashioned way. It works better. It looks complicated, but it's not.

Last edited by rickh; 06-22-2006 at 06:31 PM.
 
Old 06-23-2006, 04:08 AM   #3
fault
Member
 
Registered: Sep 2004
Distribution: Archlinux
Posts: 30

Original Poster
Rep: Reputation: 17
this brings same errors...
somehow every package i try to install using apt seems to depend on these java packages, even when i try to remove anything allready installed. What is this? Is apt somehow messed up?

Last edited by fault; 06-23-2006 at 04:15 AM.
 
Old 06-23-2006, 04:37 AM   #4
Dummy-in-Linux
Member
 
Registered: Jun 2004
Location: Bangkok, Thailand
Distribution: Fedora 25 86_64
Posts: 357

Rep: Reputation: 32
Tips....

Not use apt it doesn't work and probably will never work.

So go to the Sun Java website and download the jre-1_5_0_07-linux-i586.bin file.

https://sdlc1b.sun.com/ECom/EComActi...DFBD8917FC8A6D

Save this in the root folder and login as root run then do this;

chmod a+x jre-1_5_0_07-linux-i586.bin
./jre-1_5_0_07-linux-i586.bin
ln -s /usr/java/jre1.5.0_07/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins
/usr/sbin/alternatives --install /usr/bin/java java /usr/java/jre1.5.0_07/bin/java 1507
java -version

And Java is installed.... (the location for your Mozilla plugin fodler can be different)
 
Old 06-23-2006, 05:45 AM   #5
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
Quote:
Originally Posted by Dummy-in-Linux

Not use apt it doesn't work and probably will never work.
Are you talking about apt in general or apt for this package? And then can you explain a bit further? Thanks

To the OP:
You are doing the correct method (rickh's one also work but there is an easier one now).
What release of debian you use? Put it in your profile, please, you will get proper support.

If its what I think, its trivial to fix. But I need to know which release you use.
 
Old 06-23-2006, 06:22 AM   #6
fault
Member
 
Registered: Sep 2004
Distribution: Archlinux
Posts: 30

Original Poster
Rep: Reputation: 17
thx dummy-in-linux, but it still doesnt work interly:
Code:
root@fault:/usr/lib/mozilla# /usr/sbin/alternatives --install /usr/bin/java java /usr/java/jre1.5.0_07/bin/java 1507
bash: /usr/sbin/alternatives: No such file or directory
java -version gives me:
Code:
root@fault:/usr/lib/mozilla# java -version
java version "1.4.2"
gij (GNU libgcj) version 4.1.0 (Ubuntu 4.1.0-1ubuntu8)

Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@nx5000
I'm using Ubuntu Dapper:
Code:
root@fault:/usr/lib/mozilla# cat /proc/version
Linux version 2.6.15-25-386 (buildd@terranova) (gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)) #1 PREEMPT Wed Jun 14 11:25:49 UTC 2006
 
Old 06-23-2006, 06:29 AM   #7
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
from root:
Code:
xauth -merge ~fault/.Xauthority
and then redo apt-get

I suggest you do this, otherwise you will have the problem again
Code:
dpkg-reconfigure debconf
choose dialog
This is fixed in Debian sid, I don't know for Ubuntu

But you already installed the .bin so I don't know what will happen..

sun-dlj-v1-1 license could not be presented was the error
 
Old 06-23-2006, 06:33 AM   #8
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
/usr/sbin/update-alternatives --install /usr/bin/java java /usr/java/jre1.5.0_07/bin/java 1507
 
Old 06-23-2006, 09:06 AM   #9
fault
Member
 
Registered: Sep 2004
Distribution: Archlinux
Posts: 30

Original Poster
Rep: Reputation: 17
I tried to install java using synaptics. It displayed the licence and I was able to accept it. Installing through synaptics worked fine. I'm happy now, since everyhting is working fine. Thanks for support.
 
Old 06-23-2006, 09:57 AM   #10
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
Still you should do this:
Quote:
Originally Posted by nx5000
from root:

Code:
dpkg-reconfigure debconf
choose dialog
Because there are a few packages that will call debconf

On my release, it is corrected:
in case root is not allowed to open a window, it falls back to text mode.
 
  


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
apt-get upgrade kernel issue Jamesk5 Debian 6 04-25-2006 04:50 AM
KDE and GNOME apt issue DaBlade Linux - Software 1 01-18-2006 11:03 AM
Weird apt issue ? frochet Debian 1 12-31-2004 08:39 AM
apt GPG Signature Issue blaroe Fedora 2 01-13-2004 10:08 PM
apt-get error installing xlibs 4.2.1-14, apt-get won't work at all now pib Debian 1 12-10-2003 11:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:35 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration