简体   繁体   English

在Mac OS X Maverick上启动Rserve时出错

[英]Error while starting Rserve on Mac OS X Maverick

I am trying to start Rserve using Rserve() command in R console but I am getting an error as /Library/Frameworks/R.framework/Resources/bin/R: line 141: exec: sh: not found 我试图在R控制台中使用Rserve()命令启动Rserve但是我收到错误/Library/Frameworks/R.framework/Resources/bin/R: line 141: exec: sh: not found

I have Mac OSX Maverick. 我有Mac OSX Maverick。 I installed R version 3.1.0. 我安装了R版本3.1.0。 After this I tried to install Rserve using command install.packages("Rserve") after which in red color the message displayed was 在此之后,我尝试使用命令install.packages(“Rserve”)安装Rserve,之后显示的消息为红色

trying URL 'http://cran.cnr.Berkeley.edu/bin/macosx/mavericks/contrib/3.1/Rserve_1.7-3.tgz'
Content type 'application/x-gzip' length 329829 bytes (322 Kb)
opened URL
==================================================
downloaded 322 Kb

After this I gave command library(Rserve) in R console and no error came but then when I gave command Rserve() to start the server I got the error which I have mentioned above. 在此之后我在R控制台中给出了命令库(Rserve)并且没有出现错误但是当我给出命令Rserve()来启动服务器时,我得到了上面提到的错误。

I am unable to understand why this error is coming. 我无法理解为什么会出现这个错误。 Is it because Rserve is not installed successfully? 是因为Rserve未成功安装? How else the Rserve can be installed? 如何安装Rserve? I tried to install Rserve through source package also. 我也尝试通过源包安装Rserve。 I downloaded the source package from rforge website and when I gave the command install.packages("Rserve", type = "source") I got the error as: installation of package 'Rserve' had non-zero exit status 我从rforge网站下载了源代码包,当我发出命令install.packages(“Rserve”,type =“source”)时 ,出现错误: installation of package 'Rserve' had non-zero exit status

Any help will be great! 任何帮助都会很棒!

I also had this problem today. 我今天也遇到了这个问题。

Rserve is using openSSL library that is deprecated in mac OS X 10.7 Lion. Rserve使用的是在mac OS X 10.7 Lion中不推荐使用的openSSL库。 This causes the error: installation of package 'Rserve' had non-zero exit status So, I couldn't install Rserve by `install.packages('Rserve') in R console. 这会导致错误: installation of package 'Rserve' had non-zero exit status因此,我无法在R控制台中通过`install.packages('Rserve')安装Rserve。

To avoid this, the binaries for mavericks was installable for me: 为了避免这种情况,可以为我安装小牛队的二进制文件:

http://cran.r-project.org/bin/macosx/mavericks/contrib/3.1/ http://cran.r-project.org/bin/macosx/mavericks/contrib/3.1/

I downloaded Rserve_1.7-3.tgz and did R CMD INSTALL Rserve_1.7-3.tgz Then I could run Rserve by library(Rserve) and Rserve() in R console. 我下载了Rserve_1.7-3.tgz并做了R CMD INSTALL Rserve_1.7-3.tgz然后我可以在R控制台中按library(Rserve)Rserve()运行Rserve。

It seems that latest version of Rserve 1.8 is not available.(?) 似乎没有最新版本的Rserve 1.8 。(?)

To do this from inside R, you can run the following: 要从R内部执行此操作,您可以运行以下命令:

pkg_url <- "http://cran.r-project.org/bin/macosx/mavericks/contrib/3.1/Rserve_1.7-3.tgz"
install.packages(pkg_url, repos = NULL)

where the package URL was obtained from the link for "Mavericks binaries" on the CRAN page (towards the bottom). 包裹URL是从CRAN页面上的“Mavericks二进制文件”的链接获得的(向下)。

Same problem happened to me when I ran the function Rserve() It gave an error - Fatal error: you must specify --save , --no-save or --vanilla 当我运行函数Rserve()时发生了同样的问题它给出了一个错误 - 致命错误:你必须指定--save--no-save --vanilla --no-save--vanilla

So I tried using this code, and the server got initiated. 所以我尝试使用此代码,服务器启动了。

Rserve::run.Rserve()

I hope this helps. 我希望这有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM