R中无法更新terra包:无00LOCK文件但权限被拒问题求助
Permission Denied Error When Updating
terra Package in R 4.2.2 (Triggered by raster Update for dismo) I’m hitting a permission denied error while trying to update the terra package in R 4.2.2. The root cause is that the dismo package requires raster version ≥3.5.21, and updating raster automatically triggers a download of terra—which is where the error pops up. My currently loaded raster version is 3.5.15.
The exact error message I receive is:
Warning message: In file.copy(savedcopy, lib, recursive = TRUE) : problem copying C:\Users\xxxxx\Documents\R\win-library\4.2\00LOCK\terra\libs\x64\terra.dll to C:\Users\xxxxx\Documents\R\win-library\4.2\terra\libs\x64\terra.dll: Permission denied
Steps I’ve Already Tried
- Standard installation commands:
install.packages("terra")install.packages('terra', repos='https://rspatial.r-universe.dev')
- Installation with the
--no-lockflag:install.packages('terra', repos='https://rspatial.r-universe.dev', INSTALL_opts = '--no-lock')
- Troubleshooting by searching for and deleting the
00LOCKfile (a common fix for similar issues), but I couldn’t locate this file anywhere on my system.
Session Information
> sessionInfo() R version 4.2.2 (2022-10-31 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 17763) Matrix products: default locale: [1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252 [3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C [5] LC_TIME=English_United Kingdom.1252
内容的提问来源于stack exchange,提问作者Sam
相关产品推荐
相关产品推荐

