首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在OS10.8.2上安装R库XLConnect

在OS10.8.2上安装R库XLConnect
EN

Stack Overflow用户
提问于 2013-03-08 21:52:34
回答 1查看 5.1K关注 0票数 7

正如手册所描述的,XLConnect是“一个允许从R中读取、写入和操作Microsoft文件的包”。

在Windows和Linux上安装非常简单。只要告诉R到install.packages("XLConnect"),你就完了。安装说明说,在OS上,您需要使用install.packages("XLConnect", type="source")

在OS10.8.2下尝试这样做,R会输出许多错误消息。我把它们发到这里,这样Google就可以把类似问题的人发送给Q和A。要想解决这个问题,可以向下滚动。

R产出:

代码语言:javascript
复制
> install.packages("XLConnect", type = "source")
also installing the dependencies ‘XLConnectJars’, ‘rJava’

versuche URL 'http://ftp5.gwdg.de/pub/misc/cran/src/contrib/XLConnectJars_0.2-4.tar.gz'
Content type 'application/x-gzip' length 16539227 bytes (15.8 Mb)
URL geöffnet
==================================================
downloaded 15.8 Mb

versuche URL 'http://ftp5.gwdg.de/pub/misc/cran/src/contrib/rJava_0.9-3.tar.gz'
Content type 'application/x-gzip' length 537153 bytes (524 Kb)
URL geöffnet
==================================================
downloaded 524 Kb

versuche URL 'http://ftp5.gwdg.de/pub/misc/cran/src/contrib/XLConnect_0.2-4.tar.gz'
Content type 'application/x-gzip' length 1719698 bytes (1.6 Mb)
URL geöffnet
==================================================
downloaded 1.6 Mb

* installing *source* package ‘rJava’ ...
** Paket ‘rJava’ erfolgreich entpackt und MD5 Summen überprüft
/Library/Frameworks/R.framework/Resources/bin/config: line 142: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 143: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 219: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 142: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 143: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 219: make: command not found
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
ERROR: configuration failed for package ‘rJava’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/rJava’
ERROR: dependency ‘rJava’ is not available for package ‘XLConnectJars’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/XLConnectJars’
ERROR: dependencies ‘XLConnectJars’, ‘rJava’ are not available for package ‘XLConnect’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/XLConnect’

Die heruntergeladenen Quellpakete sind in 
    ‘/private/var/folders/some/path/to/downloaded_packages’
Warnmeldungen:
1: In install.packages("XLConnect", type = "source") :
 Installation des Pakets ‘rJava’ hatte Exit-Status ungleich 0
2: In install.packages("XLConnect", type = "source") :
 Installation des Pakets ‘XLConnectJars’ hatte Exit-Status ungleich 0
3: In install.packages("XLConnect", type = "source") :
 Installation des Pakets ‘XLConnect’ hatte Exit-Status ungleich 0
> library(XLConnect)
Fehler in library(XLConnect) : es gibt kein Paket namens ‘XLConnect’
EN

回答 1

Stack Overflow用户

发布于 2013-03-08 21:52:34

Mac上的安装比安装说明建议的要复杂一些。Mirai的Martin,这个软件包的开发人员,帮助我解决了我的困难,我想在这里发布这个过程,以帮助其他用户可能遇到同样的问题。

  1. 安装Java 出于安全考虑,最近版本的OS没有Java。如果您使用Java从版本中更新,它将被卸载!检查,如果您有Java的话。如果没有,请安装下载并安装它。
  2. 安装rJava 您将(稍后)从源代码安装XLConnect,因为OS没有二进制文件。在此安装过程中,当R试图安装依赖的包rJava时,您将得到一个错误,因为这必须从二进制文件中安装。因此,您必须首先安装它,使用 install.packages("rJava")
  3. 安装XLConnect 最后,从源代码安装XLConnect: install.packages("XLConnect", type="source")
票数 7
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15303967

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档