[英]Trouble installing the package geoR (Windows)
似乎包“geoR”已从存储库中删除。
因此,在尝试手动安装后:
install.packages(file.choose(), repos=NULL, type="source")
Installing package into "geoR_1.8-1.zip"(as ‘lib’ is unspecified)package 'geoR' successfully unpacked and MD5 sums checkedError in utils:::unpackPkgZip(pkg, pkg_name, lib, libs_only, lock, reuse_lockdir = reuse_lockdir) :package 'geoR' not installed because it is not built for UCRTWarning in install.packages :installation of package ‘geoR_1.8-1.zip’ had non-zero exit status
我有最新版本的 R (4.2.0)。 所以我尝试了另一个命令:
install.packages("geoR_1.8-1.zip", repos = NULL, type = "win.binary")
Installing package into ‘libpath’(as ‘lib’ is unspecified)package ‘geoR’ successfully unpacked and MD5 sums checkedError in install.packages : package ‘geoR’ not installed because it is not built for UCRT
那么我该如何让它工作呢?
我已经尝试卸载 R、Rstudio、Rtools42 和所有相关的文件夹......经过长时间的尝试,我想出了这个:
如果我尝试安装较旧版本的 geoR,
install.packages("geoR_1.7-5.2.tar.gz", repos = NULL, type = "source")
Installing package into ‘C:/Users/.../AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
ERROR: dependencies 'splancs', 'RandomFields' are not available for package 'geoR'
* removing 'C:/Users/..../AppData/Local/R/win-library/4.2/geoR'
Warning in install.packages :
installation of package ‘geoR_1.7-5.2.tar.gz’ had non-zero exit status
所以这似乎是一个依赖问题,并且在正确安装 splancs 之后,RandomFields(手动因为没有它的存储库)在一个长字符串(可能是编译)之后给我这个输出:
make: *** [C:/PROGRA~1/R/R-42~1.0/etc/x64/Makeconf:257: brownresnick.o] Error 1
ERROR: compilation failed for package 'RandomFields'
* removing 'C:/Users/.../AppData/Local/R/win-library/4.2/RandomFields'
Warning message:
In install.packages(file.choose()) :
installation of package ‘C:/Users/rmish/Downloads/RandomFields_3.3.tar.gz’ had non-zero exit status
有人想帮助我吗?
在此先感谢,我真的被卡住了。
CRAN 上不再提供 RandomFields 和 geoR,因此您必须下载它们各自的 tar 文件。 您还需要安装 splancs 包,该包在 CRAN 上可用。
install.packages("splancs")
在这里下载另外两个包:
http://www2.uaem.mx/r-mirror/src/contrib/RandomFields_2.0.66.tar.gz
https://cran.r-project.org/src/contrib/Archive/geoR/geoR_1.8-1.tar.gz
首先安装 RandomFields:
install.packages("C:/path/to/RandomFields_2.0.66.tar.gz", repos = NULL, type = "source")
然后是geoR:
install.packages("C:/path/to/geoR_1.8-1.tar.gz", repos = NULL, type = "source")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.