Since yesterday everything was all right because I used openCPU with R 3.4.4 . Today I tried to install in a fresh ubuntu 16.04 system the R 3.5.1 because I had a problem with a package. So what I did is following:
# Repos for R3.5.1
sudo add-apt-repository ppa:marutter/rrutter3.5
sudo add-apt-repository ppa:marutter/c2d4u
# Repos for opencpu
sudo add-apt-repository -y ppa:opencpu/opencpu-2.0
sudo apt-get update && sudo apt upgrade
# Installs OpenCPU server
sudo apt-get install -y opencpu-server
Everything seemed alright until I tried to visit the http:/ip/ocpu/test and the page never loaded. Then I searched into apache's errorlog
Error: package ‘unix’ was installed by an R version with different
internals; it needs to be reinstalled for use with this R version
From directive RSourceOnStartup on line 7 of
/etc/apache2/sites-enabled/opencpu.conf. Using locale: en_US.UTF-8
Error: package ‘unix’ was installed by an R version with different
internals; it needs to be reinstalled for use with this R version
From directive RSourceOnStartup on line 7 of
/etc/apache2/sites-enabled/opencpu.conf.
I then open an R session and tried to load the unix library which is loaded as expected and without any problem.
Any idea? Is there a conflict between opencpu and R 3.5.2?
Actually, openCPU has its own library which located at /usr/lib/opencpu/library
and those packages needed to be recompiled. So I did the following:
pkgs <- as.data.frame(installed.packages(lib.loc="/usr/lib/opencpu/library/"))
pkgs <- as.character(pkgs$Package)
install.packages(pkgs, lib="/usr/lib/opencpu/library/")
and now everything seems to be working.