从 R Forge 安装软件包时出现安装错误 [英] Installation Error When Installing Package from R Forge

查看:33
本文介绍了从 R Forge 安装软件包时出现安装错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从 R Forge 更新 zoo.

I am trying to update zoo from R Forge.

install.packages("zoo", repo = "http://r-forge.r-project.org")

但我收到以下错误

安装包到‘C:/REVOLU~1/R-COMM~1.3/R-212~1.2/library’(因为'lib'未指定)install.packages 中的警告:无法打开:HTTP 状态为404 Not Found"install.packages 中的警告:无法打开:HTTP 状态为404 Not Found"install.packages 中的警告:无法访问存储库的索引 http://r-forge.r-project.org/bin/windows/contrib/2.12install.packages 中的警告:包 ‘zoo’ 不可用

Installing package(s) into ‘C:/REVOLU~1/R-COMM~1.3/R-212~1.2/library’ (as ‘lib’ is unspecified) Warning in install.packages : cannot open: HTTP status was '404 Not Found' Warning in install.packages : cannot open: HTTP status was '404 Not Found' Warning in install.packages : unable to access index for repository http://r-forge.r-project.org/bin/windows/contrib/2.12 Warning in install.packages : package ‘zoo’ is not available

我使用的是 Revolution R 社区版本 4.3(64 位).

I am using Revolution R Community version 4.3 (64-bit).

install.packages("zoo")

安装一个稍微过时的zoo版本

Installs a slightly dated version of zoo

推荐答案

稍微澄清@DWin 和 Gabor 的回答:

To clarify @DWin's and Gabor's answers slightly more:

您遇到了麻烦,因为 R-forge 只为当前版本(现在是 2.14)和开发版本(2.15",但如果你这样引用它,Brian Ripley 可能会生气)版本的包构建二进制文件.在这种情况下,您有以下选择:

You are running into trouble because R-forge only builds binaries for the current (2.14 right now) and development ("2.15", but Brian Ripley will probably get mad if you refer to it that way) versions of packages. In this situation you have the following options:

  • 将 R 升级到当前版本(最好的主意).

如果您有充分的理由不能这样做(您没有管理权限,您正在运行依赖于以前版本的 R 的关键分析,您需要使用 Revolution R,因为它的扩展等.),然后您可以尝试以下方法之一:

If you have good reasons you can't do that (you don't have administrative rights, you are running a critical analysis that depends on a previous version of R, you need to use Revolution R because of its extensions etc.), then you can try one of the following:

  • (如上面@jthetzel 的评论所建议的)点击 二进制版本的软件包,下载二进制文件(Windows 为 zip),然后尝试从本地副本安装(使用 repos=NULL,或从相应的菜单条目).如果包隐式或显式依赖于最新版本的 R 中的功能,这将不起作用.
  • 尝试安装源版本的包:install.packages("thispkg",repos="http://r-forge.r-project.org",type="source").这仅适用于 (1) 您安装了从源代码编译软件包的工具(请参阅 R 手册,或(对于 Windows)R for Windows FAQ,谷歌搜索Rtools"等,或(对于 MacOS)R for MacOS FAQ) (2) 包只包含 R 代码,没有编译的 C/FORTRAN 代码(我认为在 zoo 包的情况下不是这样).
  • 下载源包,解压,修改DESCRIPTION文件,使维护者邮箱是你自己的,重建源码包,上传到CRAN win-builder 服务.(如果您不修改 DESCRIPTION 文件,那么您将不会被告知该包已经构建以及在哪里下载——您只会惹恼和迷惑包的维护者,谁将收到电子邮件.)(这仅适用于 Windows.)
  • (as suggested by @jthetzel's comment above) follow the links to the binary version of the package, download the binary file (zip in the case of Windows), and try installing from the local copy (with repos=NULL, or from the appropriate menu entry). This will not work if the package depends, implicitly or explicitly, on features in the latest version of R.
  • try to install the source version of the package: install.packages("thispkg",repos="http://r-forge.r-project.org",type="source"). This will only work if (1) you have the tools for compiling packages from source installed (see the R manual, or (for Windows) the R for Windows FAQ, google for "Rtools", etc., or (for MacOS) the R for MacOS FAQ) or (2) the package contains only R code, not compiled C/FORTRAN code (not true in the case of the zoo package, I think).
  • download the source package, unpack it, modify the DESCRIPTION file so that the maintainer e-mail is your own, rebuild the source package, and upload it to the CRAN win-builder service. (If you don't modify the DESCRIPTION file then you won't be informed that the package has been built and where to download it -- you'll just annoy and confuse the maintainer of the package, who will receive the e-mail.) (This only works for Windows.)

与Revolution R 相比,您遇到的一些阻力更少针对您.他们从R 赚钱并没有错(我不认为),但是为Revolution R 提供支持会增加工作量在 R 社区中(通常我们只会说升级到 R 的最新版本"并完成它),人们会变得有点脾气暴躁.

Some of the resistance you've been getting is directed less at you than at Revolution R. There's nothing wrong (I don't think) with their making money from R, but when providing support for Revolution R adds to the workload of the R community (ordinarily we would just say "upgrade to the latest version of R" and be done with it), people get a little grumpy.

这篇关于从 R Forge 安装软件包时出现安装错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆