Can't open R (4.0.3) even though it's installed on Ubuntu (20.04) - Fatal error: unable to open the base package

Viewed 409

I used to run R 3.6 but I updated it to 4.0.3 and now I can't even open R. I'm not sure how I managed to break it. I followed the installation instructions on this and this site.

When I run R --version on the command line it looks like R is installed:

R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out" Copyright
(C) 2020 The R Foundation for Statistical Computing Platform:
x86_64-pc-linux-gnu (64-bit)

But when I try to start R by typing R I get an error:

Fatal error: unable to open the base package

I tried removing the current installation with sudo apt purge r-base r-base-core r-recommended and reinstalling it with sudo apt install r-base r-base-core r-recommended but it doesn't seem to help.

When I removed my old version of R is manually removed .libPaths folders. I have later tried to recreate them (without the installed packages) but this didn't solve the problem.

Any ideas how to fix it?

1 Answers

Hi Do you still have the same problem? I solved it moving the library folder in my Documents folder, then I have created a new library flder in usr/lib/R and I have then moved again all the folders inside from Documents. The issue is that something has changed in the permission rights and R is not able to open the folder. Actually if you run "sudo R" in your terminal this should work but sudo R in not the right way to use R

Related