Updating to JDK 1.8 or 1.9 on Ubuntu

20 10 2017

Trying to install OpenDaylight Nitrogen needs JDK 1.8 or later.

Needless to say, I’ve not go the right version on my Ubuntu 16.04 server – it reports 1.7.  Also needless to say, installing it isn’t a simple matter of adding the software through apt-get because the repository appears to be broken or empty (at the time of writing).  I was hoping to get away with doing this:

sudo add-apt-repository ppa:webupd8team/java

sudo apt-get update

sudo apt-get install oracle-java9-installer

Anyway, the last part failed with:

Connecting to download.oracle.com (download.oracle.com)|104.86.110.251|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-10-20 14:05:08 ERROR 404: Not Found.download failed
Oracle JDK 9 is NOT installed.
dpkg: error processing package oracle-java9-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)

So instead I downloaded it from here:  http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html

Unpacked the tarball with this:

cd /opt
tar -xvzf jdk-9.0.1_linux-x64_bin.tar.gz

Finally updated my environment variables to tell it where the JDK is:

 export JAVA_HOME=/opt/jdk-9.0.1/
 export PATH=$JAVA_HOME/bin:$PATH

Still no cigar – Karaf won’t install because I obviously don’t know my JVM from my JDK:

andym@ubuntu-dev:~/karaf-0.7.0/bin$ ./karaf
JVM must be greater than 1.8
andym@ubuntu-dev:~/karaf-0.7.0/bin$ java -veresion
Unrecognized option: -veresion
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
andym@ubuntu-dev:~/karaf-0.7.0/bin$ java -version
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)

 

======================

14 days later, now that my frustration has died down I decided to have another go.  This time, following this process, I can download the Java 8 installer.  However the package that sets Java 8 as default fails to install – again with a 404 not found, so it looks like Oracle have moved it:

 

andym@ubuntu-dev:~/karaf-0.7.0/bin$ sudo add-apt-repository ppa:webupd8team/java
 Oracle Java (JDK) Installer (automatically downloads and installs Oracle JDK7 / JDK8 / JDK9). There are no actual Java files in this PPA.

Important -> Why Oracle Java 7 And 6 Installers No Longer Work: http://www.webupd8.org/2017/06/why-oracle-java-7-and-6-installers-no.html

Ubuntu 16.10 Yakkety Yak is no longer supported by Canonical (and thus, Launchpad and this PPA). The PPA supports Ubuntu 17.10, 17.04, 16.04, 14.04 and 12.04.

More info (and Ubuntu installation instructions):
- for Oracle Java 7: http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
- for Oracle Java 8: http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html

Debian installation instructions:
- Oracle Java 7: http://www.webupd8.org/2012/06/how-to-install-oracle-java-7-in-debian.html
- Oracle Java 8: http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html

Oracle Java 9 (for both Ubuntu and Debian): http://www.webupd8.org/2015/02/install-oracle-java-9-in-ubuntu-linux.html

Oracle JDK 9 is now considered stable. There are currently only 64bit builds (no other builds are available for download: http://www.oracle.com/technetwork/java/javase/downloads/index.html )
 More info: https://launchpad.net/~webupd8team/+archive/ubuntu/java
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmplwcxkra_/secring.gpg' created
gpg: keyring `/tmp/tmplwcxkra_/pubring.gpg' created
gpg: requesting key EEA14886 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmplwcxkra_/trustdb.gpg: trustdb created
gpg: key EEA14886: public key "Launchpad VLC" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
andym@ubuntu-dev:~/karaf-0.7.0/bin$ sudo apt-get update
Ign http://gb.archive.ubuntu.com trusty InRelease
Hit http://gb.archive.ubuntu.com trusty-updates InRelease
Hit http://gb.archive.ubuntu.com trusty-backports InRelease
Hit http://gb.archive.ubuntu.com trusty Release.gpg
Hit http://gb.archive.ubuntu.com trusty Release
Hit http://gb.archive.ubuntu.com trusty-updates/main Sources
Hit http://gb.archive.ubuntu.com trusty-updates/restricted Sources
Hit http://gb.archive.ubuntu.com trusty-updates/universe Sources
Hit http://gb.archive.ubuntu.com trusty-updates/multiverse Sources
Hit http://gb.archive.ubuntu.com trusty-updates/main amd64 Packages
Hit http://gb.archive.ubuntu.com trusty-updates/restricted amd64 Packages
Hit http://gb.archive.ubuntu.com trusty-updates/universe amd64 Packages
Hit http://gb.archive.ubuntu.com trusty-updates/multiverse amd64 Packages
Hit http://gb.archive.ubuntu.com trusty-updates/main i386 Packages
Hit http://gb.archive.ubuntu.com trusty-updates/restricted i386 Packages
Hit http://gb.archive.ubuntu.com trusty-updates/universe i386 Packages
Hit http://gb.archive.ubuntu.com trusty-updates/multiverse i386 Packages
Hit http://gb.archive.ubuntu.com trusty-updates/main Translation-en
Ign http://ppa.launchpad.net trusty InRelease
Hit http://ppa.launchpad.net trusty InRelease
Hit http://ppa.launchpad.net trusty InRelease
Hit http://ppa.launchpad.net trusty Release.gpg
Hit http://security.ubuntu.com trusty-security InRelease
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Hit http://gb.archive.ubuntu.com trusty-updates/multiverse Translation-en
Hit http://gb.archive.ubuntu.com trusty-updates/restricted Translation-en
Hit http://gb.archive.ubuntu.com trusty-updates/universe Translation-en
Hit http://ppa.launchpad.net trusty/main i386 Packages
Hit http://gb.archive.ubuntu.com trusty-backports/main Sources
Hit http://gb.archive.ubuntu.com trusty-backports/restricted Sources
Hit http://ppa.launchpad.net trusty/main Translation-en
Hit http://gb.archive.ubuntu.com trusty-backports/universe Sources
Hit http://gb.archive.ubuntu.com trusty-backports/multiverse Sources
Hit http://gb.archive.ubuntu.com trusty-backports/main amd64 Packages
Hit http://gb.archive.ubuntu.com trusty-backports/restricted amd64 Packages
Hit http://gb.archive.ubuntu.com trusty-backports/universe amd64 Packages
Hit http://gb.archive.ubuntu.com trusty-backports/multiverse amd64 Packages
Hit http://gb.archive.ubuntu.com trusty-backports/main i386 Packages
Hit http://ppa.launchpad.net trusty Release
Hit http://gb.archive.ubuntu.com trusty-backports/restricted i386 Packages
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Hit http://gb.archive.ubuntu.com trusty-backports/universe i386 Packages
Hit http://gb.archive.ubuntu.com trusty-backports/multiverse i386 Packages
Hit http://gb.archive.ubuntu.com trusty-backports/main Translation-en
Hit http://ppa.launchpad.net trusty/main i386 Packages
Hit http://gb.archive.ubuntu.com trusty-backports/multiverse Translation-en
Hit http://ppa.launchpad.net trusty/main Translation-en
Hit http://security.ubuntu.com trusty-security/main Sources
Hit http://gb.archive.ubuntu.com trusty-backports/restricted Translation-en
Hit http://gb.archive.ubuntu.com trusty-backports/universe Translation-en
Hit http://gb.archive.ubuntu.com trusty/main Sources
Hit http://gb.archive.ubuntu.com trusty/restricted Sources
Hit http://gb.archive.ubuntu.com trusty/universe Sources
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Hit http://gb.archive.ubuntu.com trusty/multiverse Sources
Hit http://gb.archive.ubuntu.com trusty/main amd64 Packages
Hit http://gb.archive.ubuntu.com trusty/restricted amd64 Packages
Hit http://gb.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://gb.archive.ubuntu.com trusty/multiverse amd64 Packages
Hit http://gb.archive.ubuntu.com trusty/main i386 Packages
Hit http://gb.archive.ubuntu.com trusty/restricted i386 Packages
Hit http://gb.archive.ubuntu.com trusty/universe i386 Packages
Hit http://gb.archive.ubuntu.com trusty/multiverse i386 Packages
Hit http://security.ubuntu.com trusty-security/restricted Sources
Hit http://gb.archive.ubuntu.com trusty/main Translation-en_GB
Hit http://ppa.launchpad.net trusty/main i386 Packages
Hit http://gb.archive.ubuntu.com trusty/main Translation-en
Hit http://gb.archive.ubuntu.com trusty/multiverse Translation-en_GB
Hit http://gb.archive.ubuntu.com trusty/multiverse Translation-en
Hit http://gb.archive.ubuntu.com trusty/restricted Translation-en_GB
Hit http://ppa.launchpad.net trusty/main Translation-en
Hit http://gb.archive.ubuntu.com trusty/restricted Translation-en
Hit http://gb.archive.ubuntu.com trusty/universe Translation-en_GB
Hit http://security.ubuntu.com trusty-security/universe Sources
Hit http://gb.archive.ubuntu.com trusty/universe Translation-en
Hit http://security.ubuntu.com trusty-security/multiverse Sources
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/restricted amd64 Packages
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages
Hit http://security.ubuntu.com trusty-security/multiverse amd64 Packages
Hit http://security.ubuntu.com trusty-security/main i386 Packages
Hit http://security.ubuntu.com trusty-security/restricted i386 Packages
Hit http://security.ubuntu.com trusty-security/universe i386 Packages
Hit http://security.ubuntu.com trusty-security/multiverse i386 Packages
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/multiverse Translation-en
Hit http://security.ubuntu.com trusty-security/restricted Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Hit https://packages.gitlab.com trusty InRelease
Hit https://packages.gitlab.com trusty/main Sources
Hit https://packages.gitlab.com trusty/main amd64 Packages
Hit https://packages.gitlab.com trusty/main i386 Packages
Get:1 https://packages.gitlab.com trusty/main Translation-en_GB
Ign https://packages.gitlab.com trusty/main Translation-en_GB
Ign https://packages.gitlab.com trusty/main Translation-en
Reading package lists... Done
andym@ubuntu-dev:~/karaf-0.7.0/bin$ sudo apt-get install oracle-java8-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
 linux-headers-3.13.0-133 linux-headers-3.13.0-133-generic
 linux-image-3.13.0-133-generic linux-image-extra-3.13.0-133-generic
Use 'apt-get autoremove' to remove them.
Suggested packages:
 binfmt-support visualvm ttf-baekmuk ttf-unfonts ttf-unfonts-core
 ttf-kochi-gothic ttf-sazanami-gothic ttf-kochi-mincho ttf-sazanami-mincho
 ttf-arphic-uming firefox firefox-2 iceweasel mozilla-firefox iceape-browser
 mozilla-browser epiphany-gecko epiphany-webkit epiphany-browser galeon
 midbrowser moblin-web-browser xulrunner xulrunner-1.9 konqueror
 chromium-browser midori google-chrome
Recommended packages:
 oracle-java8-set-default
The following packages will be upgraded:
 oracle-java8-installer
1 to upgrade, 0 to newly install, 0 to remove and 47 not to upgrade.
2 not fully installed or removed.
Need to get 32.9 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ppa.launchpad.net/webupd8team/java/ubuntu/ trusty/main oracle-java8-installer all 8u151-1~webupd8~0 [32.9 kB]
Fetched 32.9 kB in 0s (1,169 kB/s)
Preconfiguring packages ...
(Reading database ... 266611 files and directories currently installed.)
Preparing to unpack .../oracle-java8-installer_8u151-1~webupd8~0_all.deb ...
oracle-license-v1-1 license has already been accepted
Unpacking oracle-java8-installer (8u151-1~webupd8~0) over (8u144-1~webupd8~0) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for mime-support (3.54ubuntu1.1) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for shared-mime-info (1.2-0ubuntu3) ...
Setting up oracle-java7-installer (7u80+7u60arm-0~webupd8~1) ...
Downloading Oracle Java 7...
--2017-11-03 09:49:13-- http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 23.212.109.19, 23.212.109.64
Connecting to download.oracle.com (download.oracle.com)|23.212.109.19|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz [following]
--2017-11-03 09:49:13-- https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.214.183.230, 2a02:26f0:8f:29a::2d3e, 2a02:26f0:8f:28a::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.214.183.230|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1509702673_53049852cc0acc78f260f3eb0b267c3e [following]
--2017-11-03 09:49:13-- http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1509702673_53049852cc0acc78f260f3eb0b267c3e
Connecting to download.oracle.com (download.oracle.com)|23.212.109.19|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-11-03 09:49:15 ERROR 404: Not Found.

download failed
Oracle JDK 7 is NOT installed.
dpkg: error processing package oracle-java7-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up oracle-java8-installer (8u151-1~webupd8~0) ...
Using wget settings from /var/cache/oracle-jdk8-installer/wgetrc
Downloading Oracle Java 8...
--2017-11-03 09:49:15-- http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 23.212.109.64, 23.212.109.19
Connecting to download.oracle.com (download.oracle.com)|23.212.109.64|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz [following]
--2017-11-03 09:49:15-- https://edelivery.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.214.183.230, 2a02:26f0:8f:29a::2d3e, 2a02:26f0:8f:28a::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.214.183.230|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz?AuthParam=1509702675_9d331d40716a14f584f08eb71504d02f [following]
--2017-11-03 09:49:15-- http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz?AuthParam=1509702675_9d331d40716a14f584f08eb71504d02f
Connecting to download.oracle.com (download.oracle.com)|23.212.109.64|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 189736377 (181M) [application/x-gzip]
Saving to: ‘jdk-8u151-linux-x64.tar.gz’

0K ........ ........ ........ ........ ........ ........ 1% 47.0M 4s
 3072K ........ ........ ........ ........ ........ ........ 3% 54.5M 3s
 6144K ........ ........ ........ ........ ........ ........ 4% 41.5M 4s
 9216K ........ ........ ........ ........ ........ ........ 6% 53.4M 3s
 12288K ........ ........ ........ ........ ........ ........ 8% 46.8M 3s
 15360K ........ ........ ........ ........ ........ ........ 9% 57.6M 3s
 18432K ........ ........ ........ ........ ........ ........ 11% 50.3M 3s
 21504K ........ ........ ........ ........ ........ ........ 13% 54.8M 3s
 24576K ........ ........ ........ ........ ........ ........ 14% 58.1M 3s
 27648K ........ ........ ........ ........ ........ ........ 16% 53.0M 3s
 30720K ........ ........ ........ ........ ........ ........ 18% 61.6M 3s
 33792K ........ ........ ........ ........ ........ ........ 19% 53.1M 3s
 36864K ........ ........ ........ ........ ........ ........ 21% 46.6M 3s
 39936K ........ ........ ........ ........ ........ ........ 23% 46.1M 3s
 43008K ........ ........ ........ ........ ........ ........ 24% 49.3M 3s
 46080K ........ ........ ........ ........ ........ ........ 26% 45.8M 3s
 49152K ........ ........ ........ ........ ........ ........ 28% 55.9M 3s
 52224K ........ ........ ........ ........ ........ ........ 29% 59.4M 2s
 55296K ........ ........ ........ ........ ........ ........ 31% 54.5M 2s
 58368K ........ ........ ........ ........ ........ ........ 33% 66.5M 2s
 61440K ........ ........ ........ ........ ........ ........ 34% 45.9M 2s
 64512K ........ ........ ........ ........ ........ ........ 36% 11.9M 3s
 67584K ........ ........ ........ ........ ........ ........ 38% 49.4M 2s
 70656K ........ ........ ........ ........ ........ ........ 39% 64.2M 2s
 73728K ........ ........ ........ ........ ........ ........ 41% 55.7M 2s
 76800K ........ ........ ........ ........ ........ ........ 43% 42.0M 2s
 79872K ........ ........ ........ ........ ........ ........ 44% 10.2M 2s
 82944K ........ ........ ........ ........ ........ ........ 46% 5.75M 3s
 86016K ........ ........ ........ ........ ........ ........ 48% 47.1M 3s
 89088K ........ ........ ........ ........ ........ ........ 49% 5.49M 3s
 92160K ........ ........ ........ ........ ........ ........ 51% 56.2M 3s
 95232K ........ ........ ........ ........ ........ ........ 53% 50.6M 3s
 98304K ........ ........ ........ ........ ........ ........ 54% 54.3M 3s
101376K ........ ........ ........ ........ ........ ........ 56% 53.0M 3s
104448K ........ ........ ........ ........ ........ ........ 58% 55.7M 2s
107520K ........ ........ ........ ........ ........ ........ 59% 51.5M 2s
110592K ........ ........ ........ ........ ........ ........ 61% 40.9M 2s
113664K ........ ........ ........ ........ ........ ........ 63% 53.5M 2s
116736K ........ ........ ........ ........ ........ ........ 64% 12.1M 2s
119808K ........ ........ ........ ........ ........ ........ 66% 59.6M 2s
122880K ........ ........ ........ ........ ........ ........ 67% 40.7M 2s
125952K ........ ........ ........ ........ ........ ........ 69% 52.8M 2s
129024K ........ ........ ........ ........ ........ ........ 71% 30.9M 2s
132096K ........ ........ ........ ........ ........ ........ 72% 56.4M 2s
135168K ........ ........ ........ ........ ........ ........ 74% 40.6M 1s
138240K ........ ........ ........ ........ ........ ........ 76% 50.6M 1s
141312K ........ ........ ........ ........ ........ ........ 77% 33.8M 1s
144384K ........ ........ ........ ........ ........ ........ 79% 4.35M 1s
147456K ........ ........ ........ ........ ........ ........ 81% 12.4M 1s
150528K ........ ........ ........ ........ ........ ........ 82% 58.5M 1s
153600K ........ ........ ........ ........ ........ ........ 84% 44.1M 1s
156672K ........ ........ ........ ........ ........ ........ 86% 63.0M 1s
159744K ........ ........ ........ ........ ........ ........ 87% 10.1M 1s
162816K ........ ........ ........ ........ ........ ........ 89% 64.6M 1s
165888K ........ ........ ........ ........ ........ ........ 91% 10.3M 1s
168960K ........ ........ ........ ........ ........ ........ 92% 49.4M 0s
172032K ........ ........ ........ ........ ........ ........ 94% 19.9M 0s
175104K ........ ........ ........ ........ ........ ........ 96% 51.2M 0s
178176K ........ ........ ........ ........ ........ ........ 97% 43.1M 0s
181248K ........ ........ ........ ........ ........ ........ 99% 11.1M 0s
184320K ........ ....... 100% 2.77M=7.1s

2017-11-03 09:49:23 (25.5 MB/s) - ‘jdk-8u151-linux-x64.tar.gz’ saved [189736377/189736377]

Download done.
Removing outdated cached downloads...
update-alternatives: using /usr/lib/jvm/java-8-oracle/jre/bin/ControlPanel to provide /usr/bin/ControlPanel (ControlPanel) in auto mode
Do you want to continue? [Y/n] y
Get:1 http://ppa.launchpad.net/webupd8team/java/ubuntu/ trusty/main oracle-java8-set-default all 8u151-1~webupd8~0 [6,788 B]
Fetched 6,788 B in 0s (52.8 kB/s)
(Reading database ... 266609 files and directories currently installed.)
Removing oracle-java9-set-default (9.0.1-1~webupd8~0) ...
Selecting previously unselected package oracle-java8-set-default.
(Reading database ... 266608 files and directories currently installed.)
Preparing to unpack .../oracle-java8-set-default_8u151-1~webupd8~0_all.deb ...
Unpacking oracle-java8-set-default (8u151-1~webupd8~0) ...
Setting up oracle-java7-installer (7u80+7u60arm-0~webupd8~1) ...
Downloading Oracle Java 7...
--2017-11-03 09:49:58-- http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 23.212.109.19, 23.212.109.64
Connecting to download.oracle.com (download.oracle.com)|23.212.109.19|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz [following]
--2017-11-03 09:49:58-- https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.214.183.230, 2a02:26f0:8f:29a::2d3e, 2a02:26f0:8f:28a::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.214.183.230|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1509702719_627fd034d63ba0b4bc606be7d351f035 [following]
--2017-11-03 09:49:59-- http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1509702719_627fd034d63ba0b4bc606be7d351f035
Connecting to download.oracle.com (download.oracle.com)|23.212.109.19|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-11-03 09:50:01 ERROR 404: Not Found.

download failed
Oracle JDK 7 is NOT installed.
dpkg: error processing package oracle-java7-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up oracle-java8-set-default (8u151-1~webupd8~0) ...
Installing new version of config file /etc/profile.d/jdk.csh ...
Installing new version of config file /etc/profile.d/jdk.sh ...
Errors were encountered while processing:
 oracle-java7-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
andym@ubuntu-dev:~/karaf-0.7.0/bin$ sudo apt-get install oracle-java8-set-default
Reading package lists... Done
Building dependency tree
Reading state information... Done
oracle-java8-set-default is already the newest version.
The following packages were automatically installed and are no longer required:
 linux-headers-3.13.0-133 linux-headers-3.13.0-133-generic
 linux-image-3.13.0-133-generic linux-image-extra-3.13.0-133-generic
Use 'apt-get autoremove' to remove them.
0 to upgrade, 0 to newly install, 0 to remove and 47 not to upgrade.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up oracle-java7-installer (7u80+7u60arm-0~webupd8~1) ...
Downloading Oracle Java 7...
--2017-11-03 09:50:35-- http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 23.212.109.19, 23.212.109.64
Connecting to download.oracle.com (download.oracle.com)|23.212.109.19|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz [following]
--2017-11-03 09:50:35-- https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.214.183.230, 2a02:26f0:8f:29a::2d3e, 2a02:26f0:8f:28a::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.214.183.230|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1509702756_ef196d0e9ff7b1bb449257c6ff35f8b3 [following]
--2017-11-03 09:50:36-- http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1509702756_ef196d0e9ff7b1bb449257c6ff35f8b3
Connecting to download.oracle.com (download.oracle.com)|23.212.109.19|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-11-03 09:50:38 ERROR 404: Not Found.

download failed
Oracle JDK 7 is NOT installed.
dpkg: error processing package oracle-java7-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 oracle-java7-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
andym@ubuntu-dev:~/karaf-0.7.0/bin$

 

No idea why that is, but at least Karaf starts up now (phew):

 

andym@ubuntu-dev:~/karaf-0.7.0/bin$ ./karaf
karaf: JAVA_HOME not set; results may vary
Apache Karaf starting up. Press Enter to open the shell now...
100% [========================================================================]

Karaf started in 0s. Bundle stats: 10 active, 10 total





________ ________ .__ .__ .__ __
 \_____ \ ______ ____ ____ \______ \ _____ ___.__.| | |__| ____ | |___/ |_
 / | \\____ \_/ __ \ / \ | | \\__ \< | || | | |/ ___\| | \ __\
 / | \ |_> > ___/| | \| ` \/ __ \\___ || |_| / /_/ > Y \ |
 \_______ / __/ \___ >___| /_______ (____ / ____||____/__\___ /|___| /__|
 \/|__| \/ \/ \/ \/\/ /_____/ \/




Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown OpenDaylight.

opendaylight-user@root>

 

Advertisements




Linux backup stuff

31 07 2011

Booted my PC up with a Linux CD yesterday afternoon to do a ‘dd’ image of the hard disk so that I have a checkpoint in time to image my machine back to.  Only thing is, it was still only halfway through making the 300GB image by 9am this morning after running all night.  😦

Read the rest of this entry »