我正在尝试从github构建示例模板,但我收到以下错误pio build --verbose
[INFO] [Console$] [error] Modules were resolved with conflicting cross-version suffixes in {file:/home/asdf/workspace/MS-project-study/MyRecommendation/}myrecommendation:
[INFO] [Console$] [error] com.chuusai:shapeless _2.10, _2.10.4
[INFO] [Console$] java.lang.RuntimeException: Conflicting cross-version suffixes in: com.chuusai:shapeless
[INFO] [Console$] at scala.sys.package$.error(package.scala:27)
[INFO] [Console$] at sbt.ConflictWarning$.processCrossVersioned(ConflictWarning.scala:46)
[INFO] [Console$] at sbt.ConflictWarning$.apply(ConflictWarning.scala:32)
[INFO] [Console$] at sbt.Classpaths$$anonfun$100.apply(Defaults.scala:1300)
[INFO] [Console$] at sbt.Classpaths$$anonfun$100.apply(Defaults.scala:1297)
[INFO] [Console$] at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
[INFO] [Console$] at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
[INFO] [Console$] at sbt.std.Transform$$anon$4.work(System.scala:63)
[INFO] [Console$] at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
[INFO] [Console$] at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
[INFO] [Console$] at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
[INFO] [Console$] at sbt.Execute.work(Execute.scala:237)
[INFO] [Console$] at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
[INFO] [Console$] at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
[INFO] [Console$] at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
[INFO] [Console$] at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
[INFO] [Console$] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[INFO] [Console$] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[INFO] [Console$] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[INFO] [Console$] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[INFO] [Console$] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[INFO] [Console$] at java.lang.Thread.run(Thread.java:748)
[INFO] [Console$] [error] (*:update) Conflicting cross-version suffixes in: com.chuusai:shapeless
[INFO] [Console$] [error] Total time: 66 s, completed 20 May, 2018 11:55:58 AM
[ERROR] [Console$] Return code of previous step is 1. Aborting.
我的build.sbt是:
name := "template-scala-parallel-recommendation"
scalaVersion := "2.10.1"
libraryDependencies ++= Seq(
"org.apache.predictionio" %% "apache-predictionio-core" % "0.12.0-incubating" % "provided",
"org.apache.spark" %% "spark-mllib" % "2.1.1" % "provided")
我尝试过使用不同的scalaVersion 2.11.18仍然构建失败,但出现以下错误:
[INFO] [Console$] sbt.ResolveException: unresolved dependency: org.scala-lang#scala-library;2.11.18: not found
[INFO] [Console$] unresolved dependency: org.scala-lang#scalap;2.11.18: not found
[INFO] [Console$] unresolved dependency: org.scala-lang#scala-reflect;2.11.18: not found
[INFO] [Console$] unresolved dependency: org.scala-lang#scala-compiler;2.11.18: not found
[INFO] [Console$] at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:313)
[INFO] [Console$] at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:191)
[INFO] [Console$] at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:168)
[INFO] [Console$] at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
[INFO] [Console$] at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
[INFO] [Console$] at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:133)
[INFO] [Console$] at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:57)
[INFO] [Console$] at sbt.IvySbt$$anon$4.call(Ivy.scala:65)
[INFO] [Console$] at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
[INFO] [Console$] at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
[INFO] [Console$] at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
[INFO] [Console$] at xsbt.boot.Using$.withResource(Using.scala:10)
[INFO] [Console$] at xsbt.boot.Using$.apply(Using.scala:9)
[INFO] [Console$] at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
[INFO] [Console$] at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
[INFO] [Console$] at xsbt.boot.Locks$.apply0(Locks.scala:31)
[INFO] [Console$] at xsbt.boot.Locks$.apply(Locks.scala:28)
[INFO] [Console$] at sbt.IvySbt.withDefaultLogger(Ivy.scala:65)
[INFO] [Console$] at sbt.IvySbt.withIvy(Ivy.scala:128)
[INFO] [Console$] at sbt.IvySbt.withIvy(Ivy.scala:125)
[INFO] [Console$] at sbt.IvySbt$Module.withModule(Ivy.scala:156)
[INFO] [Console$] at sbt.IvyActions$.updateEither(IvyActions.scala:168)
[INFO] [Console$] at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1541)
[INFO] [Console$] at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1537)
[INFO] [Console$] at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$121.apply(Defaults.scala:1572)
[INFO] [Console$] at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$121.apply(Defaults.scala:1570)
[INFO] [Console$] at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:37)
[INFO] [Console$] at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1575)
[INFO] [Console$] at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1569)
[INFO] [Console$] at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:60)
[INFO] [Console$] at sbt.Classpaths$.cachedUpdate(Defaults.scala:1592)
[INFO] [Console$] at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1519)
[INFO] [Console$] at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1471)
[INFO] [Console$] at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
[INFO] [Console$] at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
[INFO] [Console$] at sbt.std.Transform$$anon$4.work(System.scala:63)
[INFO] [Console$] at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
[INFO] [Console$] at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
[INFO] [Console$] at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
[INFO] [Console$] at sbt.Execute.work(Execute.scala:237)
[INFO] [Console$] at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
[INFO] [Console$] at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
[INFO] [Console$] at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
[INFO] [Console$] at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
[INFO] [Console$] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[INFO] [Console$] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[INFO] [Console$] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[INFO] [Console$] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[INFO] [Console$] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[INFO] [Console$] at java.lang.Thread.run(Thread.java:748)
[INFO] [Console$] [error] (*:update) sbt.ResolveException: unresolved dependency: org.scala-lang#scala-library;2.11.18: not found
[INFO] [Console$] [error] unresolved dependency: org.scala-lang#scalap;2.11.18: not found
[INFO] [Console$] [error] unresolved dependency: org.scala-lang#scala-reflect;2.11.18: not found
[INFO] [Console$] [error] unresolved dependency: org.scala-lang#scala-compiler;2.11.18: not found
[INFO] [Console$] [error] Total time: 31 s, completed 20 May, 2018 12:14:47 PM
[ERROR] [Console$] Return code of previous step is 1. Aborting.
在终端上执行scala -version命令后,它说Scala代码运行版版本2.11.12,我已尝试使用该版本,在这种情况下,它说
[INFO] [Console$] Build finished successfully.
[INFO] [Console$] Looking for an engine...
[ERROR] [Console$] No engine found. Your build might have failed. Aborting.
有人可以帮忙解决这个问题,以便我可以构建并运行该项目吗?
答案 0 :(得分:0)
在此页面上,您可以检查可用的版本并查看与Scala和其他库的兼容性: https://mvnrepository.com/artifact/org.scala-lang/scalap
将Scala版本更改为2.11.8,一切都应该没问题。
没有Scala版本2.11.18。您可以在下面找到Scala版本: https://www.scala-lang.org/download/all.html