Search code examples
runinstallationlinux-mint

Unistall R completely from Linux Mint 19 and do a fresh install


I needed to upgrade R ver 3.5.3 to 4.0.2 for some dependency issues. I uninstalled it with

sudo apt-get purge r-base r-base-core r-* several times, it seemed OK but I realized that I wasn't completely successful.

After some hours of research online, trying different removal commands, I also deleted folders usr/local/lib/R/site-library and /usr/local/lib/R/library (which I regret doing it) and tried a fresh install by adding Ubuntu 18.04(bionic) cran mirror repositories (which is said to be compatible with Mint 19) for R ver 4.0.

Installing updated version (4.0.2) seems good but whenever I run R from cli it gives following error: Fatal error: unable to open the base package when I check the version with R --version it reports version 3.5.3 installed I've tried adding cran-35 repositories to install version 3.5.3 again but no luck. I am stuck with broken R version 3.5.3 and can't do anything else.

I am frustrated how a single update can be this hard. I am using Ubuntu 18.04 for a long time but don't have any experience with Mint flavor of it. This is our workstation to perform statistical analysis which has many users, so I need to fix it somehow.

Any help or opinion is very appreciated!


Solution

  • I gave up on Linux Mint and installed Ubuntu 20.04. R 4.0.2 works out of the box and the problem is solved.