R 新手对安装包感到困惑
我对 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
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.
您可能缺少在 Windows 下构建软件包的组件:
http://www.murdoch-sutherland.com/ R工具/
You are probably missing the components to build packages under Windows:
http://www.murdoch-sutherland.com/Rtools/
根据RCurl FAQ,
或
According to RCurl FAQ, either
or