2016-05-29 46 views
0

我剛剛在AWS上啓動了一個EC2服務器,並試圖從 github安裝一個名爲'krose/skm'的包。該軟件包在Windows上安裝時沒有任何問題,但不在Ubuntu上安裝。所有依賴關係都已安裝。我無法弄清楚爲什麼它可以安裝在Windows上,但不是Ubuntu。Ubuntu上的命名空間導出(ns,exports)錯誤,但不是Windows

library(devtools) 
install_github('krose/skm') 

並運行上面的代碼的結果是:

Downloading GitHub repo krose/[email protected] 
from URL https://api.github.com/repos/krose/skm/zipball/master 
Installing skm 
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet \ 
CMD INSTALL '/tmp/RtmpxJg8N7/devtools1b887e511e96/krose-skm-059766b' \ 
--library='/usr/local/lib/R/site-library' --install-tests 

* installing *source* package ‘skm’ ... 
** help 
*** installing help indices 
** building package indices 
** testing if installed package can be loaded 
Error in namespaceExport(ns, exports) : 
undefined exports: skm_umm_stations, skm_ummquery, skm_webquery 
Error: loading failed 
Execution halted 
ERROR: loading failed 
* removing ‘/usr/local/lib/R/site-library/skm’ 
Error: Command failed (1) 

功能使用Roxygen2記錄和出口。這些功能未使用< < - 進行分配。

這裏是我的sessionInfo()

R version 3.2.5 (2016-04-14) 
Platform: x86_64-pc-linux-gnu (64-bit) 
Running under: Ubuntu 14.04.4 LTS 

locale: 
[1] LC_CTYPE=en_US.UTF-8  LC_NUMERIC=C 
[3] LC_TIME=en_US.UTF-8  LC_COLLATE=en_US.UTF-8 
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 
[7] LC_PAPER=en_US.UTF-8  LC_NAME=C 
[9] LC_ADDRESS=C    LC_TELEPHONE=C 
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C 

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

other attached packages: 
[1] devtools_1.11.1 

loaded via a namespace (and not attached): 
[1] httr_1.1.0 R6_2.1.2  tools_3.2.5 withr_1.0.1 curl_0.9.7 
[6] memoise_1.0.0 git2r_0.14.0 digest_0.6.9 

我沒有與Ubuntu的很多經驗。

UPDATE:將R CMD檢查具有以下兩個音符:

* checking DESCRIPTION meta-information ... NOTE 
License components which are templates and need '+ file LICENSE': 
    MIT 
* checking top-level files ... NOTE 
Non-standard file/directory found at top level: 
    'README.Rmd' 
+0

R CMD檢查是在Windows上使用devtool :: check()函數進行的。 – KERO

回答

2

包中的R目錄被錯誤命名爲r。 Windows沒有考慮到差異,因爲它對文件和目錄名稱的差異更爲寬容。

+0

謝謝!只是一個附加說明:它不只是通過將文件夾從小寫更改爲大寫來修復,因爲windows/git仍然將文件夾視爲小寫。創建一個大寫R的新文件夾,將文件移動到新文件夾,刪除原始文件夾,然後將新文件夾移動到包中。 – KERO