Install Jenkins in Ubuntu 18.04 LTS failed (Failed to start LSB: Start Jenkins at boot time.)
[Root cause]
- Ubuntu 18.04 LTS use Java 9 as default java
- Jenkins 2.107.2 still use Java 8
[Solution]
Install Java 8 before install Jenkins
sudo add-apt-repository ppa:webupd8team/java sudo apt install oracle-java8-installer wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add - sudo apt-add-repository "deb https://pkg.jenkins.io/debian-stable binary/" sudo apt-get update sudo apt install jenkins
- Install java 8
sudo apt install openjdk-8-jre
- Set default java version as java 8
sudo update-alternatives --config java
- Add the key
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
- Add repository
sudo apt-add-repository "deb https://pkg.jenkins.io/debian-stable binary/"
- Install jenkins
sudo apt install jenkins