2

我写了一个Puppet在运行CentOS 6.2的虚拟机上安装Play 2.1.1。java.io.FileNotFoundException:〜/ play-2.1.1/framework/sbt/boot/update.log(没有这样的文件或目录)

木偶执行以下两个命令:

/usr/bin/wget http://downloads.typesafe.com/play/2.1.1/play-2.1.1.zip 

/usr/bin/unzip play-2.1.1.zip 

当运行在封装内部play命令,它显示了以下错误消息:

java.io.FileNotFoundException: ~/play-2.1.1/framework/sbt/boot/update.log (No such file or directory) 
    at java.io.FileOutputStream.open(Native Method) 
    at java.io.FileOutputStream.<init>(FileOutputStream.java:209) 
    at java.io.FileOutputStream.<init>(FileOutputStream.java:160) 
    at java.io.FileWriter.<init>(FileWriter.java:90) 
    at xsbt.boot.Update.<init>(Checks.java:51) 
    at xsbt.boot.Launch.update(Launch.scala:275) 
    at xsbt.boot.Launch$$anonfun$jnaLoader$1.apply(Launch.scala:120) 
    at scala.Option.getOrElse(Option.scala:108) 
    at xsbt.boot.Launch.jnaLoader$2f324eef(Launch.scala:115) 
    at xsbt.boot.Launch.<init>(Launch.scala:94) 
    at xsbt.boot.Launcher$.apply(Launch.scala:290) 
    at xsbt.boot.Launch$.apply(Launch.scala:16) 
    at xsbt.boot.Boot$.runImpl(Boot.scala:31) 
    at xsbt.boot.Boot$.main(Boot.scala:20) 
    at xsbt.boot.Boot.main(Boot.scala) 
Error during sbt execution: java.io.FileNotFoundException: ~/play-2.1.1/framework/sbt/boot/update.log (No such file or directory) 

我没有改变单行play-2.1.1目录中的代码。我搜索了错误信息,但没有找到任何有用的答案。任何人都可以指出是什么问题?

+0

哦,刚刚意识到这可能是[播放框架安装](http://stackoverflow.com/q/10559313/738138)的副本。 – gourlaysama

+0

谢谢,@gourlaysama!虽然错误消息看起来不同。 – Mingyu

回答

5

如果该文件不存在,无法创建FileOutputStream将引发一个FileNotFoundException(是的,这似乎不可思议,但see the javadoc)。

此错误可能意味着开始播放的用户没有适当的权限来创建~/play-2.1.1/framework/sbt/boot/update.log或其父目录。

+0

问题的确是用户没有适当的权限来创建目录中的文件。 – Mingyu

相关问题