I have installed Java 10 and now I'm trying to install Jenkins but I get an error saying
● jenkins.service - LSB: Start Jenkins at boot time
Loaded: loaded (/etc/init.d/jenkins; generated)
Active: failed (Result: exit-code) since Mon 2019-04-15 12:08:29 UTC; 8ms ago
Docs: man:systemd-sysv-generator(8)
Process: 9450 ExecStart=/etc/init.d/jenkins start (code=exited, status=1/FAILURE)
Apr 15 12:08:28 ip-10-0-2-17 systemd[1]: Starting LSB: Start Jenkins at boot time...
Apr 15 12:08:29 ip-10-0-2-17 jenkins[9450]: Found an incorrect Java version
Apr 15 12:08:29 ip-10-0-2-17 jenkins[9450]: Java version found:
Apr 15 12:08:29 ip-10-0-2-17 jenkins[9450]: openjdk version "10.0.2" 2018-07-17
Apr 15 12:08:29 ip-10-0-2-17 jenkins[9450]: OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4)
Apr 15 12:08:29 ip-10-0-2-17 jenkins[9450]: OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, mixed mode)
Apr 15 12:08:29 ip-10-0-2-17 jenkins[9450]: Aborting
Apr 15 12:08:29 ip-10-0-2-17 systemd[1]: jenkins.service: Control process exited, code=exited status=1
Apr 15 12:08:29 ip-10-0-2-17 systemd[1]: jenkins.service: Failed with result 'exit-code'.
Apr 15 12:08:29 ip-10-0-2-17 systemd[1]: Failed to start LSB: Start Jenkins at boot time.
dpkg: error processing package jenkins (--configure):
installed jenkins package post-installation script subprocess returned error exit status 1
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for systemd (237-3ubuntu10.12) ...
Errors were encountered while processing:
jenkins
E: Sub-process /usr/bin/dpkg returned an error code (1)
What is the issue?