user8229029
user8229029

Reputation: 1162

Most recent terra package for R will not compile

I am trying to install the newest version of the terra package, but I keep getting the following errors:

no DLL was created
ERROR: compilation failed for package 'terra'
* removing 'C:/Users/ruben/AppData/Local/R/win-library/4.2/terra'
* restoring previous 'C:/Users/ruben/AppData/Local/R/win-library/4.2/terra'
Warning in install.packages :
  installation of package ‘terra’ had non-zero exit status

I don't know if this is my fault or if there is something not right with the package or compiler. Any help on this would be great.

Upvotes: 1

Views: 859

Answers (1)

Robert Hijmans
Robert Hijmans

Reputation: 47146

To install the CRAN version from source, you need to install the system dependencies (on OSX and Linux) or, on windows, have the current version of Rtools installed.

On OSX and Windows, you can choose to not install from source. To get the latest released version you would have to wait a couple of days until CRAN has a compiled ("binary") version available for your R version and operating system.

Another way to use a recent version of "terra" on windows is to get the development version from the R-universe:

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

For more info on installation go the terra github site

Upvotes: 1

Related Questions