简体   繁体   中英

Having trouble installing terra package

R keeps getting stuck at this stage when I try to install the CRAN package terra using RStudio

Using Windows 10, R 4.0.4, RStuiod 1.4.1103

install.packages('terra')


* installing *source* package 'terra' ...
** package 'terra' successfully unpacked and MD5 sums checked
** using staged installation

   **********************************************
   WARNING: this package has a configure script
         It probably needs manual configuration
   **********************************************


** libs

*** arch - i386
rm -f terra.dll RcppExports.o RcppFunctions.o RcppModule.o arith.o crs.o distRaster.o distance.o extract.o file_utils.o focal.o gcp.o gdal_algs.o gdal_multidimensional.o gdalio.o geodesic.o geos_methods.o geosphere.o graticule.o math_utils.o mediancut.o memory.o ncdf.o ram.o raster_methods.o raster_stats.o rasterize.o read.o read_gdal.o read_ogr.o sample.o spatBase.o spatDataframe.o spatRaster.o spatSources.o spatTime.o spatVector.o string_utils.o vecmath.o vector_methods.o write.o write_gdal.o write_ogr.o
mkdir -p ../inst
"C:/PROGRA~1/R/R-40~1.4/bin/i386/Rscript.exe" --vanilla "../tools/winlibs.R" 3.4.1

One thing that looks odd to me is the last line of output which seems to rever to an older version of R maybe 3.4.1? But I have 4.0.4 installed?

install terra from dev branch, do not compile from src:

install.packages('terra', repos='https://rspatial.r-universe.dev')

alternatively, first fulfill the prerequisites mentioned in the readme in the package repo on the GH: https://github.com/rspatial/terra

Tried locally on my win11 in both modes (dev & source). If Rcpp & Rtools are installed as author suggests, the package compiles properly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM