-->

在OS 10.8.2安装[R库XLConnect(Installing R library XLCo

2019-07-21 05:30发布

XLConnect ,随着手册介绍的那样,“一个包,允许对Microsoft Excel文件读,写和操纵从内部R”。

在Windows和Linux的安装非常简单。 简单地让R能够install.packages("XLConnect")你就大功告成了。 在OS X,你需要使用install.packages("XLConnect", type="source")安装说明说。

在OS 10.8.2,R输出许多错误消息的尝试此。 我张贴在这里,所以谷歌可以发送类似的问题这个Q和A.对于解决问题的人,向下滚动。


右输出:

> 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’

Answer 1:

在Mac OSX上安装一点点的要复杂得多的安装指导建议。 马丁·斯图德在未来的解决方案,包的开发,帮助我解决我的困难,我想在这里发布的程序,以帮助其他用户可能遇到同样的问题。

  1. 安装Java
    出于安全考虑,最近OS X版本来没有的Java。 如果从使用Java版本的更新,它会被卸载! 检查 ,如果你有Java的。 如果不是, 下载并安装它。
  2. 安装rJava
    你会(后下)从源代码安装XLConnect,因为没有二进制为OS X在此安装过程中,你会得到一个错误,当R试图安装依赖包rJava,因为这必须从二进制安装。 所以,你必须先安装它,使用
    install.packages("rJava")
  3. 安装XLConnect
    最后,从源代码安装XLConnect:
    install.packages("XLConnect", type="source")


文章来源: Installing R library XLConnect on OS 10.8.2