Installing Jenkins on Ubuntu 18.04

I installed Jenkins on my Linux machine following this tutorial:

https://linuxize.com/post/how-to-install-jenkins-on-ubuntu-18-04/

But the command:

$ sudo apt install jenkins

Failed! It happened because my Ubuntu had a newer version of the openjdk, let to remove it:

$ dpkg -l openjdk*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===============================-====================-====================-====================================================================
un openjdk-11-demo (no description available)
ii openjdk-11-jdk:amd64 10.0.2+13-1ubuntu0.1 amd64 OpenJDK Development Kit (JDK)
ii openjdk-11-jdk-headless:amd64 10.0.2+13-1ubuntu0.1 amd64 OpenJDK Development Kit (JDK) (headless)
ii openjdk-11-jre:amd64 10.0.2+13-1ubuntu0.1 amd64 OpenJDK Java runtime, using Hotspot JIT
ii openjdk-11-jre-headless:amd64 10.0.2+13-1ubuntu0.1 amd64 OpenJDK Java runtime, using Hotspot JIT (headless)
un openjdk-11-source (no description available)
un openjdk-6-jre-headless (no description available)
un openjdk-8-demo (no description available)
ii openjdk-8-jdk:amd64 8u191-b12-0ubuntu0.1 amd64 OpenJDK Development Kit (JDK)
ii openjdk-8-jdk-headless:amd64 8u191-b12-0ubuntu0.1 amd64 OpenJDK Development Kit (JDK) (headless)
ii openjdk-8-jre:amd64 8u191-b12-0ubuntu0.1 amd64 OpenJDK Java runtime, using Hotspot JIT
ii openjdk-8-jre-headless:amd64 8u191-b12-0ubuntu0.1 amd64 OpenJDK Java runtime, using Hotspot JIT (headless)
un openjdk-8-source (no description available)
$ sudo apt purge openjdk-11-jre:amd64 openjdk-11-jre-headless:amd64 openjdk-11-jdk-headless:amd64 openjdk-11-jdk:amd64

After doing it the instalation worked fine.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s