簡體   English   中英

特拉維斯 CI 錯誤,而 devtools::chech() 沒有

[英]Travis CI error while devtools::chech() doesn't

這是 github 中的包

正如您在 travis.yml 中看到的,警告不會被視為錯誤。 當我在控制台中執行check()時,沒有錯誤。 結果如下:

0 errors ✓ | 4 warnings x | 1 note x

這是 Travis CI 的最后幾行。

ERROR: dependency ‘raster’ is not available for package ‘leaflet’
* removing ‘/home/travis/R/Library/leaflet’
* installing *source* package ‘modelr’ ...
** package ‘modelr’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (modelr)
* installing *source* package ‘tidyverse’ ...
** package ‘tidyverse’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (tidyverse)
The downloaded source packages are in
    ‘/tmp/RtmpX59PJA/downloaded_packages’
Warning messages:
1: In i.p(...) : installation of package ‘terra’ had non-zero exit status
2: In i.p(...) : installation of package ‘units’ had non-zero exit status
3: In i.p(...) : installation of package ‘raster’ had non-zero exit status
4: In i.p(...) : installation of package ‘sf’ had non-zero exit status
5: In i.p(...) :
  installation of package ‘leaflet’ had non-zero exit status
missing: terra, raster, units, leaflet, sf
The command "Rscript -e 'deps <- remotes::dev_package_deps(dependencies = NA);remotes::install_deps(dependencies = TRUE);if (!all(deps$package %in% installed.packages())) { message("missing: ", paste(setdiff(deps$package, installed.packages()), collapse=", ")); q(status = 1, save = "no")}'" failed and exited with 1 during .
Your build has been stopped.

我應該修改什么才能讓它通過 Travis CI?

我認為您的包至少取決於rastersf 並且您的腳本沒有安裝它們:

1: In i.p(...) : installation of package ‘terra’ had non-zero exit status
2: In i.p(...) : installation of package ‘units’ had non-zero exit status
3: In i.p(...) : installation of package ‘raster’ had non-zero exit status
4: In i.p(...) : installation of package ‘sf’ had non-zero exit status

原因很可能是您沒有安裝所需的系統依賴項(GDAL、GEOS 等)。 在安裝這些軟件包之前,您需要將這樣的東西添加到您的系統中

sudo apt-get install libgdal-dev libproj-dev libgeos-dev libudunits2-dev netcdf-bin

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM