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.