为什么 com.typesafe.slick#slick_2.11;2.0.2: not found 出现 UNRESOLVED DEPENDENCIES 错误? [英] Why is UNRESOLVED DEPENDENCIES error with com.typesafe.slick#slick_2.11;2.0.2: not found?

查看:30
本文介绍了为什么 com.typesafe.slick#slick_2.11;2.0.2: not found 出现 UNRESOLVED DEPENDENCIES 错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从类型安全激活器运行 hello slick 示例我在 sbt 中创建了一个项目,当我输入 run 时,它给了我以下错误

I m trying to run hello slick example from the typesafe activator I create a project in sbt when I type run it gives me following error

warn]   ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.slick#slick_2.11;2.0.2: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.slick#slick_2.11;2.0.2: not found
[error] Total time: 1 s, completed Aug 25, 2014 12:20:42 AM

这是我的 build.sbt 文件

here is my build.sbt file

name :="hellos"

version :="1.0"

scalaVersion := "2.11.1"

mainClass in Compile := Some("HelloSlick")

libraryDependencies ++= List(
  "com.typesafe.slick" %% "slick" % "2.0.2",
  "org.slf4j" % "slf4j-nop" % "1.6.4",
  "com.h2database" % "h2" % "1.3.170"
)

我使用的是 ubuntu 12.04 并且在 slick 网站上没有 jar 文件可供下载,因此它不在我的系统路径变量中,例如 java 和 akka

I m using ubuntu 12.04 and on slick website there is no jar file is present to download so like its not in my system path variable like java and akka is

推荐答案

您需要类型安全存储库的解析器:

You need the resolver to the typesafe repository:

libraryDependencies ++= List(
  "com.typesafe.slick" %% "slick" % "2.0.2",
  "org.slf4j" % "slf4j-nop" % "1.6.4",
  "com.h2database" % "h2" % "1.3.170"
)

resolvers += "typesafe" at "http://repo.typesafe.com/typesafe/releases/"

似乎对于 scala 2.11,您需要将 slick 版本指定为 2.1:

It seems that for scala 2.11 you need to specify the slick version to be 2.1:

"com.typesafe.slick" %% "slick" % "2.1.0"

这篇关于为什么 com.typesafe.slick#slick_2.11;2.0.2: not found 出现 UNRESOLVED DEPENDENCIES 错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆