Error while starting Rserve on Mac OS X Maverick
Asked Answered
G

3

5

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

I have Mac OSX Maverick. I installed R version 3.1.0. After this I tried to install Rserve using command install.packages("Rserve") after which in red color the message displayed was

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.

I am unable to understand why this error is coming. Is it because Rserve is not installed successfully? How else the Rserve can be installed? I tried to install Rserve through source package also. 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

Any help will be great!

Grindlay answered 7/7, 2014 at 22:24 Comment(5)
You say "R console" but it's not clear how you started up the instance of R. Did you start R from a Terminal session? Aslo, which version of R did you install. There are two binary versions.Sharpeyed
@BondedDust I didn't started R from Mac terminal. By "R console" I meant the normal R widow where we issue commands like install.packages(). Also I have already mentioned the version of R in above post (version 3.1.0)Grindlay
"normal Mac window" and not starting from Terminal session suggests you are using the R.app GUI. That is not recommended for Rserve initiation.Sharpeyed
@BondedDust but everywhere on web thee is no mention of such limitation. Every where it is given that you can start the Rserve from normal R console(within R).Grindlay
Best place to pose Q is R-SIG-Mac. I don't consider the R,app to be what is typically meant when people say "normal console" but Simon Urbanek would be the authority since he wrote much of both R.app and Rserve.Sharpeyed
T
6

I also had this problem today.

Rserve is using openSSL library that is deprecated in mac OS X 10.7 Lion. 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.

To avoid this, the binaries for mavericks was installable for me:

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.

It seems that latest version of Rserve 1.8 is not available.(?)

Theona answered 10/11, 2014 at 1:39 Comment(1)
Still have the problem on Yosemite, today.Theona
B
3

To do this from inside R, you can run the following:

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).

Blear answered 9/3, 2015 at 17:49 Comment(0)
H
0

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

So I tried using this code, and the server got initiated.

Rserve::run.Rserve()

I hope this helps.

Hidie answered 21/6, 2017 at 19:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.