简体   繁体   English

安装包 geoR 时遇到问题 (Windows)

[英]Trouble installing the package geoR (Windows)

it seems that the package "geoR" was removed from the repository.似乎包“geoR”已从存储库中删除。

So after trying to install it manually with:因此,在尝试手动安装后:

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

I have the latest version of R (4.2.0).我有最新版本的 R (4.2.0)。 So I've tried another command:所以我尝试了另一个命令:

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

So how do I make it work?那么我该如何让它工作呢?

I've already tried to uninstall R, Rstudio, Rtools42 and all the folders associated... After a long try, I came up with this:我已经尝试卸载 R、Rstudio、Rtools42 和所有相关的文件夹......经过长时间的尝试,我想出了这个:

If I try to install an older version of geoR,如果我尝试安装较旧版本的 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

So this seems a dependancies issue, and after installing splancs correctly, RandomFields (manually because there is no repository for it) give me this output after a long string (maybe the compilation):所以这似乎是一个依赖问题,并且在正确安装 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

Somebody wants to help me?有人想帮助我吗?

Thanks in advance, I'm really stuck.在此先感谢,我真的被卡住了。

Both RandomFields and geoR are no longer available on CRAN, so you'll have to download their respective tar files. CRAN 上不再提供 RandomFields 和 geoR,因此您必须下载它们各自的 tar 文件。 You'll also need to install the splancs package, which is available on CRAN.您还需要安装 splancs 包,该包在 CRAN 上可用。

install.packages("splancs") 

Download the two other packages here:在这里下载另外两个包:

http://www2.uaem.mx/r-mirror/src/contrib/RandomFields_2.0.66.tar.gz 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 https://cran.r-project.org/src/contrib/Archive/geoR/geoR_1.8-1.tar.gz

Install RandomFields first:首先安装 RandomFields:

install.packages("C:/path/to/RandomFields_2.0.66.tar.gz", repos = NULL, type = "source")

And then geoR:然后是geoR:

install.packages("C:/path/to/geoR_1.8-1.tar.gz", repos = NULL, type = "source")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM