Search code examples
rlinuxubunturstudio-server

Rstudio server cannot find correct location of R installation (ubuntu)


I have R 3.4.0 installed to /home/ubuntu/software/R/R-3.4.0/bin, which is a 'non-standard' install location. I then installed rstudio server, and edited the rserver.conf file to include: rsession-which-r=/home/ubuntu/software/R/R-3.4.0/bin

I thought this would be sufficient. At ip:8787 the rstudio server login box appears, and I can login, but then get an error that no session was found.

I also tried adding to the rserver.conf file:

rsession-ld-library-path=/home/ubuntu/software/R/R-3.4.0/bin

but this failed to even load the rstudio login page at ip:8787. After removing this line I now cannot even get back to the login page.

  1. What is going wrong here? Linux has been a nightmare for me, it's been missing file after missing file error, EVEN after I blatantly set LD env variables to the correct paths (via LD_config, make.config files AND configuration files). I feel like I'm missing something fundamental here.

  2. What is the correct command to install R to Rstudio's expected path, if there's no sane way to tell rstudio-server it's in a non-standard path? I used:

./configure --prefix=/home/ubuntu/software/R/R-3.4.0 --with-x=yes --enable-R-shlib=yes --with-cairo=yes
make

to install.

Additional info:

cat /var/log/user.log | grep rstudio
 - nothing
cat /var/log/syslog | grep rstudio
 - many errors, first:  ERROR R did not return any output when queried for directory location information
sudo rstudio-server verify-installation
 - ERROR R script path (/home/ubuntu/software/R/R-3.4.0/bin) is a directory rather than a file

Solution

  • Issue was with

    `rsession-ld-library-path=/home/ubuntu/software/R/R-3.4.0/bin` 
    

    The rconfig file needs to point to a file (not dir), should be:

    rsession-ld-library-path=/home/ubuntu/software/R/R-3.4.0/bin‌​/R