Jan 3 2010

Getting Sun’s Java 1.6 JDK Installed On Debian

Category: AlexRobson @ 13:47

I recently had a somewhat frustrating experience trying to get the 1.6 JDK installed on Debian (as a prerequisite for other software). Even though I’m a Linux n00b, maybe it will help someone else to have a 1 stop location for everything I had to look up.

The first thing I needed to do was add the Ubuntu multiverse apt-get repository. To do that click: System > Administration > Software Sources > Third-Party Software tab > + Add: type in deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse and then ok. You’re going to get prompted to refresh so that Debian can pull down all the packages available BUT you’ll end up with an error like this: “GPG error: <url>: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5”.

The next thing you do is resolve the public key issue. You can go ahead and close out of the Software Sources window. The command lines I’m about to show you are issued from the Root Terminal b/c it’s a pain typing sudo all over the place. Open your terminal window. Type:

gpg –recv-keys 40976EAF437D05B5

The first time I issued this command I saw the following:

gpg: directory `/root/.gnupg' created
gpg: new configuration file `/root/.gnupg/gpg.conf' created
gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/root/.gnupg/secring.gpg' created
gpg: keyring `/root/.gnupg/pubring.gpg' created
gpg: can't open `40976EAF437D05B5'
rubizzle:/installers/rubymine91.15/bin# gpg 40976EAF437D05B5
gpg: can't open `40976EAF437D05B5'

If you see that, just run the command again and you should see:

gpg: requesting key 437D05B5 from hkp server keys.gnupg.net
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key 437D05B5: public key "Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1

Followed by the public key block. Once that’s done, type:

gpg --export --armor 40976eaf437d05b5 | apt-key add -

This command should be followed by ‘OK’. Now you can update the repository’s package list by typing:

apt-get update.

NOW you can actually install the JDK by typing:

apt-get install sun-java6-jdk

There are some interactive steps to follow from that point on, but the directions are straight forward.

Tags:

Comments

1.
pingback jslinux.cn says:

Pingback from jslinux.cn

Getting Sun's Java 1.6 JDK Installed On Debian | Just  linux!

2.
Bryan Nash Bryan Nash United States says:

The Java 1.6 binary is available from Sun.
Upon trying my old-fashioned way of installing it, I discovered an error in the execution of make-jpkg. It just told me that a plugin was missing and died. I imagine there will be an update to java-package soon.

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading