R 新手对安装包感到困惑

发布于 2024-10-10 04:15:32 字数 1574 浏览 0 评论 0原文

我对 R 有点陌生,我以为我了解如何从 CRAN 镜像和源文件安装软件包,但现在我被难住了。我目前在 Windows 7 32 位计算机上使用 R 2.10.0。

我想尝试使用此处找到的 RGoogleAnalytics 软件包,并且正在尝试请按照说明进行操作。他们指示我们安装 omegahat 的 RCurl 和 XML 包。例如,

install.packages("RCurl", repos = "http://www.omegahat.org/R")

但这不起作用,因为我收到以下错误:

Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
  package ‘RCurl’ is not available

当我尝试此操作时:

install.packages("RCurl", repos = "http://www.omegahat.org/R", type="source")

文件下载后出现以下错误。我之前有1.0版本,现在已经恢复了。

trying URL 'http://www.omegahat.org/R/src/contrib/RCurl_1.5-0.tar.gz'
Content type 'application/x-gzip' length 735041 bytes (717 Kb)
opened URL
downloaded 717 Kb

* installing *source* package 'RCurl' ...
Warning in system("sh ./configure.win") : sh not found
ERROR: configuration failed for package 'RCurl'
* removing 'C:/PROGRA~1/R/R-210~1.0/library/RCurl'
* restoring previous 'C:/PROGRA~1/R/R-210~1.0/library/RCurl'

The downloaded packages are in
        ‘C:\Users\Brock\AppData\Local\Temp\Rtmpc9wt5N\downloaded_packages’
Warning message:
In install.packages("RCurl", repos = "http://www.omegahat.org/R",  :
  installation of package 'RCurl' had non-zero exit status

无需详细说明,我无法使用 RGoogleAnalytics 包,因为我遇到了与此 帖子。我只是想尽一切可能的选择来解决这个错误。

您能提供的任何帮助或见解将不胜感激!

I am somewhat new to R, and I thought I understood how to install packages from CRAN mirrors and from source files, but now I am stumped. I currently am using R 2.10.0 on a Windows 7 32-bit machine.

I want to try to use the RGoogleAnalytics package found here and am trying to follow the instructions. They instruct us to install both RCurl and the XML packages from omegahat. For example,

install.packages("RCurl", repos = "http://www.omegahat.org/R")

however this does not work, as I get the following error:

Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
  package ‘RCurl’ is not available

When I try this instead:

install.packages("RCurl", repos = "http://www.omegahat.org/R", type="source")

I get the following error after the file downloads. I previously had version 1.0 and that is restored.

trying URL 'http://www.omegahat.org/R/src/contrib/RCurl_1.5-0.tar.gz'
Content type 'application/x-gzip' length 735041 bytes (717 Kb)
opened URL
downloaded 717 Kb

* installing *source* package 'RCurl' ...
Warning in system("sh ./configure.win") : sh not found
ERROR: configuration failed for package 'RCurl'
* removing 'C:/PROGRA~1/R/R-210~1.0/library/RCurl'
* restoring previous 'C:/PROGRA~1/R/R-210~1.0/library/RCurl'

The downloaded packages are in
        ‘C:\Users\Brock\AppData\Local\Temp\Rtmpc9wt5N\downloaded_packages’
Warning message:
In install.packages("RCurl", repos = "http://www.omegahat.org/R",  :
  installation of package 'RCurl' had non-zero exit status

Without going into details, I haven't been able to use the RGoogleAnalytics package as I get the same error that is found in this post. I simply am trying to exhaust every possible option to get around the error.

Any help or insight you can provide will be greatly appreciated!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

暮凉 2024-10-17 04:15:32

CRAN 上的 RCurl 项目页面 表示 Windows 二进制文件不可用。 自述文件将您指向由 Ripley 教授维护的页面,他在其中提供 RCurl 和其他几个在 Windows 上有特殊构建需求的软件包的二进制文件。但是,他只为 R 的最新主要版本提供它们,因此您需要升级到 R-2.12.0 才能从他的页面安装它们。

如果您想在 Windows 上从源代码构建软件包,则需要先安装 Rtools。看来你还没有这样做。即使您安装了它们,仍然需要额外的步骤在 Windows 上构建 RCurl...否则 Windows 二进制文件已经在 CRAN 上。

您最好的选择可能是升级 R 并从 Ripley 教授的页面安装 RCurl。

The RCurl project page on CRAN says the Windows binary is not available. The ReadMe points you to a page maintained by Professor Ripley, where he provides binaries of RCurl and several other packages that have special build needs on Windows. However, he only provides them for the most recent major revision of R, so you would need to upgrade to R-2.12.0 to install them from his page.

If you want to build packages from source on Windows, you need to install Rtools first. It looks like you haven't done that. Even if you had them installed, it will still require extra steps to build RCurl on Windows... else the Windows binary would already be on CRAN.

Your best bet is probably to upgrade R and install RCurl from Prof. Ripley's page.

不必了 2024-10-17 04:15:32

您可能缺少在 Windows 下构建软件包的组件:

http://www.murdoch-sutherland.com/ R工具/

You are probably missing the components to build packages under Windows:

http://www.murdoch-sutherland.com/Rtools/

万人眼中万个我 2024-10-17 04:15:32

根据RCurl FAQ

  • 在您的路径中找不到curl-config

  • curl-config且相关开发库(libcurl)未安装。

According to RCurl FAQ, either

  • curl-config is not found in your path

or

  • curl-config and related devlopment libraries (libcurl) are not installed.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文