1

Raster package is not loading nor installing properly since I (recently) updated R. I get the following error message when trying to load raster:

library(raster)
Loading required package: sp
Error: package or namespace load failed for ‘raster’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 namespace ‘terra’ 1.4-22 is being loaded, but >= 1.5.12 is required  

Is it just me? or is there an issue with the package raster loading/installing in R? I read about other people having similar issues but is there a way to fix it? What can I try doing? I tried uninstalling and reinstalling raster, sp, and terra as well as restarting R. I can't get terra to install version 1.5.12...

Version: RStudio 2021.09.0+351 "Ghost Orchid" Release for Windows

Thank you.

r2evans
  • 141,215
  • 6
  • 77
  • 149
FishyFishies
  • 301
  • 3
  • 14
  • `install.packages("terra")`, restart R, try again. (You may need to restart R before re-installing it as well, depending on the package.) – r2evans Feb 01 '22 at 03:24
  • 2
    https://stackoverflow.com/questions/39176007/namespace-nlme-3-1-121-is-being-loaded-but-3-1-123-is-required, https://stackoverflow.com/questions/66782751/namespace-rlang-0-4-5-is-being-loaded-but-0-4-10-is-required, and https://stackoverflow.com/questions/37714918/error-trying-to-load-a-package-in-rstudio are all pointing in a similar direction: reinstall and restart. Please try doing that, and if it does not work then come back with the errors it provides. Good luck. – r2evans Feb 01 '22 at 03:28
  • Thank you. I will try that and let you know what happens! – FishyFishies Feb 03 '22 at 21:05

0 Answers0