Allen_Tsang
Allen_Tsang

Reputation: 615

jenkins installation stuck with java dependency

I do exactly as the jenkins official website say, just fail. command java -version comes out

java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

command apt install -y jenkins comes out

jenkins : Depends: default-jre-headless (>= 2:1.8) 
but 2:1.7-51 is to be installed or java8-runtime-headless 
but it is not installable

apt-get upgrade && apt-get update has no effect.

any idea? i am not familiar with java.

Upvotes: 1

Views: 934

Answers (1)

Pobe
Pobe

Reputation: 2793

On Ubuntu I needed to upgrade java by :

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

sudo apt-get install jenkins

Note that java 7 should work as well.

Upvotes: 1

Related Questions