Tom Richards
Tom Richards

Reputation: 11

After upgrade in Ubuntu to R 3.4.0 and newest rstudio, rstudio crashes with, "r error 4"

A few days ago I upgraded from R 3.3.3 to R R 3.4.0, using

./configure  --enable-r-shlib
make
sudo make install
dpkg -i rstudio-1.0.143-amd64.deb

From command line, R works wonderfully:

> R.version

platform       x86_64-pc-linux-gnu         
arch           x86_64                      
os             linux-gnu                   
system         x86_64, linux-gnu           
status                                     
major          3                           
minor          4.0                         
year           2017                        
month          04                          
day            21                          
svn rev        72570                       
language       R                           
version.string R version 3.4.0 (2017-04-21)
nickname       You Stupid Darkness         
> require(utils)

> .libPaths()

[1] "/usr/local/lib/R/library"

However, rstudio crashes upon start-up. The command line gives:

> rstudio

"TypeError: undefined is not an object (evaluating 'window.desktopHooks.notifyRCrashed')"
QIODevice::read: device not open
QIODevice::read: device not open

Further, the interface pop-up window says:

The R session had a fatal error.

ERROR r error 4 (R code execution error) [errormsg=Error in as.environment(pos) : 
  no item called "package:utils" on the search list
]; OCCURRED AT: rstudio::core::Error rstudio::r::exec::evaluateString(const string&, SEXPREC**, rstudio::r::sexp::Protect*) /home/ubuntu/rstudio/src/cpp/r/RExec.cpp:302

I have uninstalled and reinstalled both R and rstudio numerous times, after manually rm -rf ~/.rstudio-desktop and various other folders ~/.R*, as suggested in posts. Still, no rstudio. I cannot find any other installed version of R on this machine. What can I try next in order to fix this?

Upvotes: 1

Views: 1540

Answers (2)

Dirk is no longer here
Dirk is no longer here

Reputation: 368499

I have absolutely no problem using the prebuilt R 3.4.0 binaries for Ubuntu from CRAN along with current dailies from RStudio (and I have a littler script to fetch them, also see the matching one for RStudio Desktop):

R> R.Version()$version
[1] "R version 3.4.0 (2017-04-21)"
R> rstudioapi::getVersion()
[1] ‘1.1.135’
R> 

If the R you built yourself does not work, maybe you can try the prebuilt one many of us use?

Edit: Now that the question has been formatted, the error of no item called "package:utils" on the search list is more apparent. You may somehow have told R to ignore its own packages. You need to fix that. Your installation is essentially crippled. So with that, do consider the pre-built binaries. They work.

Upvotes: 1

Kevin Ushey
Kevin Ushey

Reputation: 21315

My guess, based on this bit of output:

> .libPaths()
[1] "/usr/local/lib/R/library"

Are you trying to use the same library path as you had with R 3.3? This won't fly -- R packages aren't cross-compatible between minor versions of R. You will have to re-install any R packages you want to use with R 3.4.0.

Upvotes: 1

Related Questions