I installed RStudio server on a CentOS7 machine with R using precompiled version provided by RStudio. Originally I ried installing R from source, but then found the precompiled version (R-4.0.3-1-1.x86_64) which I installed. R is working and I have packages installed (including tidiverse)
However, I cannot get the server to work because unfortunately, when running the following command I get an error
> sudo rstudio-server verify-installation
/usr/lib/rstudio-server/bin/rsession: error while loading shared libraries: libR.so: cannot open shared object file: No such file or directory
I have spent hours trying to figure out what's wrong, but all the options I see are related to the source version which needs to be compiled (i.e. --enable-R-shlib which I don't have as an option when using precompiled)
This is not helping...
I really don't know how to fix this. I reinstalled the server but the problem stays, it seems I just dont have this shared library...
I would try compiling R from source, with ./configure --enable-R-shlib, I have never used RHEL based Linux distributions but in case it helps, these would be the steps for Debian based OS'.
sudo apt-get install -y gfortran libreadline6-dev libx11-dev libxt-dev \
libpng-dev libjpeg-dev libcairo2-dev xvfb \
libbz2-dev libzstd-dev liblzma-dev \
libcurl4-openssl-dev \
texinfo texlive texlive-fonts-extra \
screen wget libpcre2-dev
cd /usr/local/src
sudo wget https://cran.rstudio.com/src/base/R-4/R-4.0.5.tar.gz
sudo su
tar zxvf R-4.0.3.tar.gz
cd R-4.0.5
./configure --enable-R-shlib #--with-blas --with-lapack
make
make install
cd ..
rm -rf R-4.0.5*
exit
cd
Thanks for the quick reply
I have tried this but I'm on CentOS7 and trying to install R from source did not work unfortunately.
I have installed it successfully on another similar machine and it's working perfectly, but somehow I did mess things up I can't get this to work anymore regardless of un- or reinstalling so I suspect that somewhere a setting got messed up ...
Yea the only message I get is the one you can see in my first post. Unfortunately, the path to the missing library file (libR.so) is not set, so I have no clue how to start fixing this. There is a libR.so file in my standard R library (/opt/R/4.0.2/lib/R/lib) but that does not seem to be enough...
Thanks again for thinking out loud and trying to give tips
Maybe I misunderstood your previous comment, just to clarify, do you have successfully compiled R from source with the --enable-R-shlib option and RStudio Server still doesn't work?
How are you actually enabling these different R versions? Above you mentioned rsession-which-r=/opt/R/4.0.5/ in rserver.conf. Have you tried setting that variable to full path of the actual R binary, i.e. something like /opt/R/4.0.5/lib64/R/bin/R? Or to add the right R to the front of the PATH?