3

I tried installing jenkins on Ubuntu 14.04.5 and ended up with some errors saying,

Setting up jenkins (2.80) ...
Found an incorrect Java version
Java version found:
java version "1.7.0_131"
OpenJDK Runtime Environment (IcedTea 2.6.9) (7u131-2.6.9-0ubuntu0.14.04.2)
OpenJDK 64-Bit Server VM (build 24.131-b00, mixed mode)

Aborting
invoke-rc.d: initscript jenkins, action "start" failed.
dpkg: error processing package jenkins (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
 jenkins
E: Sub-process /usr/bin/dpkg returned an error code (1)

As jenkins requires Java 8 to run, I tried installing Java 8 and again getting the same error mentioned above. I have tried removing jenkins, ended up with the same error "Found an incorrect Java version".

I need help to get this issue resolved. Thanks in advance.

Sonam Pasi
  • 562
  • 1
  • 4
  • 19
Ramdinesh J P
  • 139
  • 1
  • 9

1 Answers1

1

Have a look here:

can't upgrade jenkins for java version error

If that does not help:

Have you checked alternatives and JAVA_HOME? If not, please check the output of these commands:

update-alternatives --config java

echo $JAVA_HOME

Both should be set to java 8 values.

Ritzelprimpf
  • 176
  • 1
  • 11