【问题标题】:Error while importing SBT project, even after making changes to VM ware parameters导入 SBT 项目时出错,即使在更改了 VM ware 参数之后也是如此
【发布时间】:2018-08-19 00:55:36
【问题描述】:

我正在尝试在我的 IntelliJ 中导入 sbt 和其他依赖项,但它失败并出现以下错误。 我已经尝试过unresolved dependencies - Error while importing SBT project

给出的解决方案

但它不起作用。

以下是错误日志:

导入 sbt 项目时出错:

Java 版本:1.7 VM ware : 许可的最新版本

Getting org.scala-sbt sbt 1.2.1  (this may take some time)...
unresolved dependency: org.scala-sbt#sbt;1.2.1: not found
(see /home/cloudera/.sbt/boot/update.log for complete log)
Error: Could not retrieve sbt 1.2.1

:: problems summary ::
:::: WARNINGS
module not found: org.scala-sbt#sbt;1.2.1

==== local: tried

/home/cloudera/.ivy2/local/org.scala-sbt/sbt/1.2.1/ivys/ivy.xml

-- artifact org.scala-sbt#sbt;1.2.1!sbt.jar:

/home/cloudera/.ivy2/local/org.scala-sbt/sbt/1.2.1/jars/sbt.jar

==== local-preloaded-ivy: tried

file:////home/cloudera/.sbt/preloaded/org.scala-sbt/sbt/1.2.1/ivys/ivy.xml

==== local-preloaded: tried

file:////home/cloudera/.sbt/preloaded/org/scala-sbt/sbt/1.2.1/sbt-1.2.1.pom

-- artifact org.scala-sbt#sbt;1.2.1!sbt.jar:

file:////home/cloudera/.sbt/preloaded/org/scala-sbt/sbt/1.2.1/sbt-1.2.1.jar

==== Maven Central: tried

https://repo1.maven.org/maven2/org/scala-sbt/sbt/1.2.1/sbt-1.2.1.pom

-- artifact org.scala-sbt#sbt;1.2.1!sbt.jar:

https://repo1.maven.org/maven2/org/scala-sbt/sbt/1.2.1/sbt-1.2.1.jar

==== sbt-maven-releases: tried

https://repo.scala-sbt.org/scalasbt/maven-releases/org/scala-sbt/sbt/1.2.1/sbt-1.2.1.pom

-- artifact org.scala-sbt#sbt;1.2.1!sbt.jar:

https://repo.scala-sbt.org/scalasbt/maven-releases/org/scala-sbt/sbt/1.2.1/sbt-1.2.1.jar

==== sbt-maven-snapshots: tried

https://repo.scala-sbt.org/scalasbt/maven-snapshots/org/scala-sbt/sbt/1.2.1/sbt-1.2.1.pom

-- artifact org.scala-sbt#sbt;1.2.1!sbt.jar:

https://repo.scala-sbt.org/scalasbt/maven-snapshots/org/scala-sbt/sbt/1.2.1/sbt-1.2.1.jar

==== typesafe-ivy-releases: tried

https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/1.2.1/ivys/ivy.xml

==== sbt-ivy-snapshots: tried

https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/sbt/1.2.1/ivys/ivy.xml

::::::::::::::::::::::::::::::::::::::::::::::

::          UNRESOLVED DEPENDENCIES         ::

::::::::::::::::::::::::::::::::::::::::::::::

:: org.scala-sbt#sbt;1.2.1: not found

::::::::::::::::::::::::::::::::::::::::::::::


:::: ERRORS
Server access Error: Received fatal alert: protocol_version url=https://repo1.maven.org/maven2/org/scala-sbt/sbt/1.2.1/sbt-1.2.1.pom

Server access Error: Received fatal alert: protocol_version url=https://repo1.maven.org/maven2/org/scala-sbt/sbt/1.2.1/sbt-1.2.1.jar

Server access Error: Connection reset url=https://repo.scala-sbt.org/scalasbt/maven-releases/org/scala-sbt/sbt/1.2.1/sbt-1.2.1.pom

Server access Error: Connection reset url=https://repo.scala-sbt.org/scalasbt/maven-releases/org/scala-sbt/sbt/1.2.1/sbt-1.2.1.jar

Server access Error: Connection reset url=https://repo.scala-sbt.org/scalasbt/maven-snapshots/org/scala-sbt/sbt/1.2.1/sbt-1.2.1.pom

Server access Error: Connection reset url=https://repo.scala-sbt.org/scalasbt/maven-snapshots/org/scala-sbt/sbt/1.2.1/sbt-1.2.1.jar

Server access Error: Connection reset url=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/1.2.1/ivys/ivy.xml

Server access Error: Connection reset url=https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/sbt/1.2.1/ivys/ivy.xml


:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
Error during sbt execution: Error retrieving required libraries

【问题讨论】:

  • VM ware 参数无需做任何更改

标签: scala apache-spark sbt virtual-machine


【解决方案1】:

这是 cloudera VM 的常见问题。 jdk 版本是 1.7,scala 2.12 需要 jdk 版本 1.8。

下载最新的jdk并解压到桌面。当您为 scala 打开一个新项目时,请确保您的 jdk 指向您下载的最新项目。(默认情况下,它将使用与 cloudera VM 一起打包的 jdk 1.7。

希望这会有所帮助。

【讨论】:

    猜你喜欢
    • 2019-02-12
    • 2018-04-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-06
    • 1970-01-01
    • 2016-08-10
    • 2020-01-28
    相关资源
    最近更新 更多