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

相關問題