WeBWorK Main Forum

Instructions for Rserve installation need updating

Instructions for Rserve installation need updating

by Sean Fitzpatrick -
Number of replies: 5
We've just migrated our WeBWorK service over to a new server. All went well, but I ran into some trouble getting Rserve up and running for our stats problems.

After some troubleshooting, we figured it out.
The current instructions at
have a couple of things that don't work if one is installing on Ubuntu 18.04 (which I expect is the most common configuration at the moment).

Installing R using apt is easy enough, and the Rscript command to install rserve works fine too. (Though there is an Ubuntu package r-cran-rserve which is possibly a better choice? Not sure.)

First trouble spot: the config file for systemd should be in /lib/systemd/system, not /usr/lib/systemd/system.
Second trouble spot: the config file itself, which we're advised to download from GitHub, expects Rserve to be installed in /usr/lib64/R/bin/Rserve.
But on Ubuntu, R installs to /usr/lib/R (lib, not lib64).

I don't have an edit account on the wiki, it seems. But I thought I'd mention this here in case someone else encounters the same trouble.
In reply to Sean Fitzpatrick

Re: Instructions for Rserve installation need updating

by Michael Gage -
Hi Sean,

Thanks for this info.

Are you sure you don’t have an edit account on that wiki? I thought everyone who is registered on the site
can edit most pages. (Click on the “login/signup” link in the upper right hand corner of the page.) Once you
are logged in you should see “edit” and “history” and other tabs.

Let me know if you don’t.

Take care,

Mike


In reply to Michael Gage

Re: Instructions for Rserve installation need updating

by Sean Fitzpatrick -
I'm pretty sure I tried logging in using the same credentials I use to access this forum and it doesn't work. But maybe I did something wrong. I'll try again tomorrow.
In reply to Sean Fitzpatrick

Re: Instructions for Rserve installation need updating

by Sean Fitzpatrick -
Ahhhh... stupid me. Moodle user IDs aren't case sensitive, but they are for the wiki. My seanfitzpatrick user ID here became SeanFitzpatrick on the wiki.
I'll go propose some edits.
In reply to Sean Fitzpatrick

Re: Instructions for Rserve installation need updating

by Danny Glin -
Those instructions were written based on my experience setting up Rserve on CentOS 7. I'm not surprised that things are different in Ubuntu.

If you're going to edit the wiki page, please do not delete the current information, as I believe it is still correct for CentOS/RHEL users. Just add some instructions as to what applies to which flavour of linux. If you aren't able to get into the wiki I can make the changes, but I probably won't have time until January.

The same applies to the systemd script, which I threw together rather quickly. I'll see about making it work with both paths (or having Ubuntu and CentOS variants), but again it won't happen until January.

In terms of Rscript vs. apt for installing Rserve, the Ubuntu package is probably a better choice since updates will be handled by the system. There was a problem recently with CRAN not having a recent enough version of the Rserve library to work with the latest version of R. I'm not sure if they have caught up yet.
In reply to Danny Glin

Re: Instructions for Rserve installation need updating

by Sean Fitzpatrick -
Hi Danny,
I made two edits: a remark after the Rscript instructions that there's also an Ubuntu package (although I didn't indicate a preference), and a second bullet point to add that if /usr/lib/systemd/system doesn't exist, then try /lib/systemd/system instead, and also to check the install path for R, and edit your file if necessary.

I installed using Rscript, but I'd be willing to test out what happens if we use the Ubuntu package instead. Do you know if it's difficult to uninstall via Rscript? I have no familiarity with using it.