Reputation: 2981
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!
Upvotes: 5
Views: 2710
Reputation: 11
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.
Upvotes: 0
Reputation: 13823
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).
Upvotes: 3
Reputation: 352
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:
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.(?)
Upvotes: 6