-
-
Notifications
You must be signed in to change notification settings - Fork 6
Vagrantで開発する
Yoshiyuki Sakamoto edited this page Aug 4, 2019
·
3 revisions
$ sbt run
...
java.lang.UnsupportedClassVersionError: com/typesafe/config/ConfigException : Unsupported major.minor version 52.0
Javaのバージョンを調べてみる。
$ java -version
java version "1.7.0_201"
OpenJDK Runtime Environment (IcedTea 2.6.17) (7u211-2.6.17-0ubuntu0.1)
OpenJDK 64-Bit Server VM (build 24.201-b00, mixed mode)
多分 Java 8 をいれなければならない。
sudo add-apt-repository ppa:openjdk-r/ppa -y
sudo apt-get update
sudo apt-get install openjdk-8-jdk -y
これでインストールできたはずだけど
$ java -version
java version "1.7.0_201"
OpenJDK Runtime Environment (IcedTea 2.6.17) (7u211-2.6.17-0ubuntu0.1)
OpenJDK 64-Bit Server VM (build 24.201-b00, mixed mode)
変わっていない
$ javac -version
javac 1.8.0_222
javac の方は変わっている
$ dpkg -l | grep java
ii ca-certificates-java 20130815ubuntu1 all Common CA certificates (JKS keystore)
ii java-common 0.51 all Base of all Java packages
ii libatk-wrapper-java 0.30.4-4 all ATK implementation for Java using JNI
ii libatk-wrapper-java-jni:amd64 0.30.4-4 amd64 ATK implementation for Java using JNI (JNI bindings)
ii libhawtjni-runtime-java 1.0~+git0c502e20c4-3+deb7u1build0.14.04.1 all Java library that provide JNI code generation
ii libjansi-java 1.4-3 all Java library for generating and interpreting ANSI escape sequences
ii libjansi-native-java 1.0-4 all Java library for ANSI escape sequences - native component
ii nodejs 12.7.0-1nodesource1 amd64 Node.js event-based server-side javascript engine
ii tzdata-java 2019a-0ubuntu0.14.04 all time zone and daylight-saving time data for use by java runtimes
分かりづらいので、 java8のboxをベースとして作成することを考える
このboxをもとにインストールスクリプトを動かして、lgtmoonを動かそうとしたところ
vagrant@vagrant-ubuntu-trusty-64:~/lgtmoon$ scala -version
Scala code runner version 2.9.2 -- Copyright 2002-2011, LAMP/EPFL
vagrant@vagrant-ubuntu-trusty-64:~/lgtmoon$ sbt
Getting org.scala-sbt sbt 0.13.11 ...
:: problems summary ::
:::: WARNINGS
module not found: org.scala-sbt#sbt;0.13.11
==== local: tried
/home/vagrant/.ivy2/local/org.scala-sbt/sbt/0.13.11/ivys/ivy.xml
-- artifact org.scala-sbt#sbt;0.13.11!sbt.jar:
/home/vagrant/.ivy2/local/org.scala-sbt/sbt/0.13.11/jars/sbt.jar
==== Maven Central: tried
https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.11/sbt-0.13.11.pom
-- artifact org.scala-sbt#sbt;0.13.11!sbt.jar:
https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.11/sbt-0.13.11.jar
==== typesafe-ivy-releases: tried
https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.11/ivys/ivy.xml
==== sbt-ivy-snapshots: tried
https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/sbt/0.13.11/ivys/ivy.xml
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.scala-sbt#sbt;0.13.11: not found
::::::::::::::::::::::::::::::::::::::::::::::
:::: ERRORS
Server access Error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target url=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.11/ivys/ivy.xml
Server access Error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target url=https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/sbt/0.13.11/ivys/ivy.xml
:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: org.scala-sbt#sbt;0.13.11: not found
Error during sbt execution: Error retrieving required libraries
(see /home/vagrant/.sbt/boot/update.log for complete log)
Error: Could not retrieve sbt 0.13.11