1

我按照说明“brew install sbt”并尝试使用 sbt 运行它。但我得到了这个。我不知道为什么。我应该做一些额外的步骤吗?

java.io.IOException: Not a directory
    at java.io.UnixFileSystem.createFileExclusively(Native Method)
    at java.io.File.createNewFile(File.java:1012)
    at xsbt.boot.Locks$.apply0(Locks.scala:34)
    at xsbt.boot.Locks$.apply(Locks.scala:28)
    at xsbt.boot.Launch.locked(Launch.scala:238)
    at xsbt.boot.Launch.app(Launch.scala:147)
    at xsbt.boot.Launch.app(Launch.scala:145)
    at xsbt.boot.Launch$.run(Launch.scala:102)
    at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
    at xsbt.boot.Launch$.launch(Launch.scala:117)
    at xsbt.boot.Launch$.apply(Launch.scala:18)
    at xsbt.boot.Boot$.runImpl(Boot.scala:41)
    at xsbt.boot.Boot$.main(Boot.scala:17)
    at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: java.io.IOException: Not a directory
4

1 回答 1

1

首先,确保您运行 sbt 的目录包含构建定义,例如build.scalaor build.sbt

看起来 sbt 正在尝试创建文件并被拒绝。尝试运行 sbt sudo。如果可行,则您的问题在于运行权限,您应该使用它chown来修复它们。

于 2015-03-25T03:25:58.990 回答