我正在尝试更新R-4.2.2中的terra
包,但遇到了以下问题;
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
已尝试使用install.packages("terra")
、install.packages('terra', repos='https://rspatial.r-universe.dev')
和install.packages('terra', repos='https://rspatial.r-universe.dev', INSTALL_opts = '--no-lock')
-结果相同
根据许多建议,我已经去寻找00 LOCK文件删除它,然后再试一次,但它不存在的地方,我可以找到它。
我的问题的根源是dismo
需要raster
v3.5.21,并更新raster
,使其符合terra
下载的调用,这些错误。‘package ‘raster’ 3.5.15 is loaded, but >= 3.5.21 is required by ‘dismo’’
> 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
1条答案
按热度按时间noj0wjuj1#
关闭R(和R-Studio),并删除此文件夹:
如果存在,也删除这些文件夹。
然后打开R并安装“terra”