Java8-runtime-headless dependency for Scala -2.12.2 with .deb and rpm

I am trying to install Scala -2.12.2 on Ubuntu16.04 and Ubuntu16.10 on Linux using .deb . When installing .deb I get the error "scala depends on java8-runtime-headless, however: package java8-runtime-headless not installed".

This dependency is not required when I try to execute intsall Scala -2.12.2 on Red Hat Enterprise Linux (RHEL) using scala rpm . Any idea why there is a dependency difference in .deb and rpm format.

I am using Java java version "1.8.0" Java (TM) SE Runtime Environment (build pxa6480sr4fp5-20170421_01 (SR4 FP5)) to build.

+3


source to share


2 answers


The solution is the download open-jdk-8

that the error messages ask for. In Ubuntu 16.04, it is already available in the Universe repository. Make sure you have this in your file /etc/apt/source.list

.

Then run the usual commands

apt-get update
apt-get install openjdk-8-jdk


These lines will be installed complete open-jdk-8

, not only its version without a head, used for applications where the display device, keyboard or mouse is not .

Good luck!

+2


source


I have the same error message on Ubuntu, however I have Java 8 installed (manually installed the latest Oracle version). Once installed, it works. Java is in the classpath (I manually linked / usr / bin / java with my installation)

I hope this is the same for you.



This is my activity log:

$ scala
The program 'scala' is currently not installed. You can install it by typing:
sudo apt-get install scala

$ wget https://downloads.lightbend.com/scala/2.12.2/scala-2.12.2.deb

$ sudo dpkg -i scala-2.12.2.deb
Selecting previously unselected package scala.
(Reading database ... 1342927 files and directories currently installed.)
Preparing to unpack scala-2.12.2.deb ...
Unpacking scala (2.12.2-400) ...
dpkg: dependency problems prevent configuration of scala:
 scala depends on java8-runtime-headless; however:
  Package java8-runtime-headless is not installed.

dpkg: error processing package scala (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Errors were encountered while processing:
 scala

$ scala -version
Scala code runner version 2.12.2 -- Copyright 2002-2017, LAMP/EPFL and     Lightbend, Inc.

      

0


source







All Articles