# How to fix jenkins installation error on ubuntu linux

**URL:** <https://community.jenkins.io/t/how-to-fix-jenkins-installation-error-on-ubuntu-linux/4747>\
**Category:** Using Jenkins\
**Created:** [November 28, 2022, 5:11am UTC](https://community.jenkins.io/t/how-to-fix-jenkins-installation-error-on-ubuntu-linux/4747 "2022-11-28T05:11:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![manikandan](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@manikandan](https://community.jenkins.io/u/manikandan)\
**Post date:** [November 28, 2022, 5:11am UTC](https://community.jenkins.io/t/how-to-fix-jenkins-installation-error-on-ubuntu-linux/4747/1 "2022-11-28T05:11:46Z")

</div>

● jenkins.service - Jenkins Continuous Integration Server  
Loaded: loaded (/lib/systemd/system/jenkins.service; enabled; vendor preset: enabled)  
Active: activating (auto-restart) (Result: exit-code) since Mon 2022-11-28 05:07:42 UTC; 8ms ago  
Process: 22182 ExecStart=/usr/bin/jenkins (code=exited, status=1/FAILURE)  
Main PID: 22182 (code=exited, status=1/FAILURE)

Nov 28 05:07:42 ip-172-31-19-156 systemd[1]: jenkins.service: Main process exited, code=exited, status=1/FAILURE  
Nov 28 05:07:42 ip-172-31-19-156 systemd[1]: jenkins.service: Failed with result ‘exit-code’.  
Nov 28 05:07:42 ip-172-31-19-156 systemd[1]: Failed to start Jenkins Continuous Integration Server.  
dpkg: error processing package jenkins (–configure):  
installed jenkins package post-installation script subprocess returned error exit status 1  
Errors were encountered while processing:  
jenkins  
E: Sub-process /usr/bin/dpkg returned an error code (1)

---

<div class="post-metadata">

**Author:** ![MarkEWaite](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/markewaite/32/20_2.png) [@MarkEWaite](https://community.jenkins.io/u/MarkEWaite)\
**Post date:** [November 28, 2022, 5:17am UTC](https://community.jenkins.io/t/how-to-fix-jenkins-installation-error-on-ubuntu-linux/4747/2 "2022-11-28T05:17:37Z")

</div>

> **[Managing systemd services](https://www.jenkins.io/doc/book/system-administration/systemd-services/#reading-service-logs)**
>
> Jenkins – an open source automation server which enables developers around the world to reliably build, test, and deploy their software

suggests that you should read the system logs with the command:

`# journalctl -u jenkins`

That may tell you that Jenkins is trying to use Java 11 but your system is configured to use Java 8. It may tell you that your system does not have Java installed. It may provide other hints about what is causing the Jenkins service to not start on your machine.

You may also want to read and assure that you follow all the installation instructions.

> **[Linux](https://www.jenkins.io/doc/book/installing/linux/#debianubuntu)**
>
> Jenkins – an open source automation server which enables developers around the world to reliably build, test, and deploy their software

---

<div class="post-metadata">

**Author:** ![manikandan](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@manikandan](https://community.jenkins.io/u/manikandan)\
**Post date:** [November 28, 2022, 5:23am UTC](https://community.jenkins.io/t/how-to-fix-jenkins-installation-error-on-ubuntu-linux/4747/3 "2022-11-28T05:23:18Z")

</div>

I have installed java1.8 only, After i put "journalctl -u jenkins " command … i am getting below – Logs begin at Sun 2022-11-27 15:40:45 UTC, end at Mon 2022-11-28 05:17:01 UTC. –  
Nov 27 16:12:09 ip-172-31-19-156 systemd[1]: Starting Jenkins Continuous Integration Server…  
Nov 27 16:12:09 ip-172-31-19-156 jenkins[17844]: jenkins: invalid Java version: openjdk version “1.8.0\_352”  
Nov 27 16:12:09 ip-172-31-19-156 jenkins[17844]: OpenJDK Runtime Environment (build 1.8.0\_352-8u352-ga-1~20.04-b08)  
Nov 27 16:12:09 ip-172-31-19-156 jenkins[17844]: OpenJDK 64-Bit Server VM (build 25.352-b08, mixed mode)  
Nov 27 16:12:09 ip-172-31-19-156 systemd[1]: jenkins.service: Main process exited, code=exited, status=1/FAILURE  
Nov 27 16:12:09 ip-172-31-19-156 systemd[1]: jenkins.service: Failed with result ‘exit-code’.  
Nov 27 16:12:09 ip-172-31-19-156 systemd[1]: Failed to start Jenkins Continuous Integration Server.  
Nov 27 16:12:09 ip-172-31-19-156 systemd[1]: jenkins.service: Scheduled restart job, restart counter is at 1.  
Nov 27 16:12:09 ip-172-31-19-156 systemd[1]: Stopped Jenkins Continuous Integration Server.  
Nov 27 16:12:09 ip-172-31-19-156 systemd[1]: Starting Jenkins Continuous Integration Server…  
Nov 27 16:12:09 ip-172-31-19-156 jenkins[17918]: jenkins: invalid Java version: openjdk version “1.8.0\_352”  
Nov 27 16:12:09 ip-172-31-19-156 jenkins[17918]: OpenJDK Runtime Environment (build 1.8.0\_352-8u352-ga-1~20.04-b08)  
Nov 27 16:12:09 ip-172-31-19-156 jenkins[17918]: OpenJDK 64-Bit Server VM (build 25.352-b08, mixed mode)  
Nov 27 16:12:09 ip-172-31-19-156 systemd[1]: jenkins.service: Main process exited, code=exited, status=1/FAILURE  
Nov 27 16:12:09 ip-172-31-19-156 systemd[1]: jenkins.service: Failed with result ‘exit-code’.  
Nov 27 16:12:09 ip-172-31-19-156 systemd[1]: Failed to start Jenkins Continuous Integration Server.  
Nov 27 16:12:09 ip-172-31-19-156 systemd[1]: jenkins.service: Scheduled restart job, restart counter is at 2.  
Nov 27 16:12:09 ip-172-31-19-156 systemd[1]: Stopped Jenkins Continuous Integration Server.  
Nov 27 16:12:09 ip-172-31-19-156 systemd[1]: Starting Jenkins Continuous Integration Server…  
Nov 27 16:12:10 ip-172-31-19-156 jenkins[18065]: jenkins: invalid Java version: openjdk version “1.8.0\_352”  
Nov 27 16:12:10 ip-172-31-19-156 jenkins[18065]: OpenJDK Runtime Environment (build 1.8.0\_352-8u352-ga-1~20.04-b08)

---

<div class="post-metadata">

**Author:** ![MarkEWaite](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/markewaite/32/20_2.png) [@MarkEWaite](https://community.jenkins.io/u/MarkEWaite)\
**Post date:** [November 28, 2022, 5:51am UTC](https://community.jenkins.io/t/how-to-fix-jenkins-installation-error-on-ubuntu-linux/4747/4 "2022-11-28T05:51:00Z")

</div>

> [@manikandan](#):
>
> I have installed java1.8 only

The Java requirements page (linked from the installing page) says that you must have Java 11 or Java 17. Java 8 is not supported by recent Jenkins versions

[https://www.jenkins.io/doc/administration/requirements/java/](https://www.jenkins.io/doc/administration/requirements/java/)

> [@manikandan](#):
>
> Nov 27 16:12:09 ip-172-31-19-156 jenkins[17918]: jenkins: invalid Java version: openjdk version “1.8.0\_352”

The message “invalid Java version” is telling you that you need a supported version of Java. Jenkins supports Java 11 and Java 17 for new installs. Install and configure Java 11 or Java 17.

---

<div class="post-metadata">

**Author:** ![veereshalladi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/veereshalladi/32/2912_2.png) [@veereshalladi](https://community.jenkins.io/u/veereshalladi)\
**Post date:** [December 9, 2022, 5:10pm UTC](https://community.jenkins.io/t/how-to-fix-jenkins-installation-error-on-ubuntu-linux/4747/5 "2022-12-09T17:10:38Z")

</div>

yes frist remove java-1.8 --\>yum remove java-1.8\* and install openjdk 11 or 17 this has worked for me

---

<div class="post-metadata">

**Author:** ![manikandan](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@manikandan](https://community.jenkins.io/u/manikandan)\
**Post date:** [December 13, 2022, 5:43pm UTC](https://community.jenkins.io/t/how-to-fix-jenkins-installation-error-on-ubuntu-linux/4747/6 "2022-12-13T17:43:38Z")

</div>

Thank you brothers @MarkEWaite@veereshalladi
