Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiling R 3.5.1 from source, no libR.so

Tags:

r

rstudio

I'm using Ubuntu 18.04, source code for R 3.5.1 and the following configure command

 ./configure --enable-R-shlib --with-tcltk --with-tcl-config=/usr/lib/tclConfig.sh --with-tk-config=/usr/lib/tkConfig.sh

It seems to configure, compile and install just fine. However when I attempt to run RStudio it givs an error saying it can't find "libR.so". Compiling previous versions of R produced a copy of libR.so that was installed but for some reason this version is not, so it does not get installed and RStudio complains. Is there something missing or do I need to add something to the configure statement to get it to produce the libR.so file?

like image 450
Jim Maas Avatar asked Jul 31 '18 21:07

Jim Maas


1 Answers

I found a solution, I had to reconfigure and recompile R, leaving off the specification for tcltk stuff. For some reason, configuring with tcltk and "--enable-R-shlib" do not play nice together. The combination that worked was, when compiling R from source

make clean
./configure --enable-R-shlib
make
sudo make install

And then RStudio Desktop 1.1.456, installed from the .deb, seems to find R fine and it all works.

like image 178
Jim Maas Avatar answered Nov 16 '22 02:11

Jim Maas