2012-06-07 87 views
2

是否有其他人有問題從github構建slidingify包?我想玩,但安裝返回一個錯誤。下面是我用commmands並導致錯誤:從源代碼構建Slidify包

> library(devtools) 
Rtools not on path and not installed in default location. 
Warning message: 
package ‘devtools’ was built under R version 2.14.2 
> install_github('slidify', 'ramnathv') 
Installing github repo(s) slidify/master from ramnathv 
Installing slidify.zip from https://github.com/ramnathv/slidify/zipball 
Installing slidify 
* checking for file 'C:\Users\btibert\AppData\Local\Temp\RtmpsrQIgw\ramnathv-slidify-954647c/DESCRIPTION' ... OK 
* preparing 'slidify': 
* checking DESCRIPTION meta-information ... OK 
Warning in .write_description(db, ldpath) : 
    Unknown encoding with non-ASCII data: converting to ASCII 
* checking for LF line-endings in source and make files 
* checking for empty or unneeded directories 
* building 'slidify_0.1.tar.gz' 
ERROR 
packaging into .tar.gz failed 
Error: Command failed (1) 
In addition: Warning message: 
running command '"C:/PROGRA~1/R/R-214~1.1/bin/i386/R" CMD build "C:\Users\btibert\AppData\Local\Temp\RtmpsrQIgw\ramnathv-slidify-954647c" --no-manual --no-vignettes' had status 1 

我在Windows 7上,但這裏是我的會話信息,以防萬一:

> sessionInfo() 
R version 2.14.1 (2011-12-22) 
Platform: i386-pc-mingw32/i386 (32-bit) 

locale: 
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C       
[5] LC_TIME=English_United States.1252  

attached base packages: 
[1] stats  graphics grDevices utils  datasets methods base  

other attached packages: 
[1] devtools_0.6 plyr_1.7.1 RODBC_1.3-4 

loaded via a namespace (and not attached): 
[1] RCurl_1.9-5.1 tools_2.14.1 

更新:更新至R 2.15.0之後,我得到以下錯誤(即使安裝Rtools後):

Warning: invalid package 'Files/R/R-2.15.0/library' 
Error: ERROR: cannot cd to directory 'C:/Program' 
Error: Command failed (1) 
In addition: Warning message: 
running command '"C:/PROGRA~1/R/R-215~1.0/bin/i386/R" CMD INSTALL C:\Users\btibert\AppData\Local\Temp\Rtmp8oMxGU/slidify_0.1.tar.gz --library=C:/Program Files/R/R-2.15.0/library' had status 1 
+0

我開發了'slidingify'。我在Mac上,所以我不確定這個問題會是什麼。我會看看我是否可以找到一臺Windows機器來構建並找出問題所在。根據你的錯誤信息,它看起來像一個'rtools'安裝問題。也許''devtools'郵件列表或'github'上的某個人可以提供幫助。 – Ramnath

+0

在Mac上工作很好....不幸的是我在工作時使用Windows機器。感謝把這些放在一起,我一直在等待一段時間。 – Btibert3

+0

我現在在Windows7上,安裝正常。 Btibert3我認爲問題在於,當滑動具有R(> = 2.15.0)作爲依賴關係時,您正在運行2.14。 – Dason

回答

2

您正在運行R 2.14.1(根據您的SessionInfo)。 slidingify將R(> = 2.15.0)作爲依賴關係,因此您將無法按原樣安裝它。如果可能,我會建議升級到2.15。

我試圖讓它與2.14.1一起工作,它只是沒有發生。但它在2.15下運行得非常好。

我不知道究竟是什麼取決於R 2.15,但它可能是ramnathv把它作爲依賴關係纔是安全的。我分叉它,並減少依賴2.14(install_github('slidify', 'Dasonk')),它安裝罰款在我的副本R2.14.1,但我沒有真正測試過的任何功能。

所以,如果你不能更新R你可以嘗試從我的叉子抓住它,或者如果你有一個Github帳戶,你可以自己分叉它,然後改變依賴。如果確實有需要2.15的功能,你可以嘗試找出解決辦法,然後向ramnathv發送一個請求。

+0

是的。爲了安全起見,我放了2.15.0。現在你提到它了,我沒有看到爲什麼它不適用於2.14.1的任何理由,除非其中一個依賴需要2.15.0。我會相應地檢查和修改要求。 – Ramnath

+0

當我檢查時,我沒有在任何依賴項中看到2.15的要求,但就像我在我的回答中所說的那樣,我試圖讓事情工作,並且2.14我得到了一些錯誤,並且2.15一切正常。 – Dason

+0

有趣。想知道在2.14和2.15之間發生了什麼變化,使事情變得不同。該問題是否也在Mac上持續存在? – Ramnath