Issues installing R4.0

0

Been trying to update to R 4.0 but am stuck in a loop of doom. Hope someone can help me out..

I've cleared out the old version of R, upgraded and updated everything I can, but I still have this unresolved dependency..

The following packages have unmet dependencies.
 r-base : Depends: r-recommended (= 4.0.2-1.1804.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

System: Host: vanagpau-730U3E-740U3E Kernel: 4.15.0-117-generic x86_64 bits: 64 compiler: gcc v: 7.5.0 Desktop: Cinnamon 4.2.4 wm: muffin dm: LightDM Distro: Linux Mint 19.2 Tina base: Ubuntu 18.04 bionic

Were you following the instruction on CRAN? And did you remove manual or with

$ sudo apt-remove r-base`

Hi yes I did that. I deleted previous version of R and updated everything.

But just realised I have not added the entry to source.list - I don't know what this is and am a bit scared of changing it as I'm a linux noob.

As always, back up the existing file to a holding file and edit it to add the repo. It's something that will be needed from time to time. Is

$ sudo apt-remove r-base

how you removed the earlier installation?

I can't remember exactly ! but I did that and also used some code i pulled from a website which looked like it detected all things R and deleted them.. I think it used a xargs command?

Linux has package managers for a reason—dinking around with scripts that are imperfectly understood or guessing which files to manually delete are harmful to the system's health. A working R installation has more interlocking parts than any user should be attempting to adjust. That's what makefiles are for. My current R/x86_64-pc-linux-gnu-library/ has 7442 directories containing 42688 files.

Try again with

$ sudo apt-get remove r-base-core

According to Dirk Eddelbuettel, a trusted authority, I was wrong about remove r-base, that's just a wrapper.

Thanks @technocrat - I think I'd benefit from a few concise lessons on how linux works. I am generally just dinking around, which does not feel safe! Here's a list of words/things I don't understand;

  • PPA's, packages, root, commands sudo / apt / get etc, all the -t -y type things, repos, dependencies, compiling, source code, headers
    Where can I find somewhere that explains the basics of all this??

FYI - I added the line of code t my source file and subject to an installation of this thing called V8 which is required for one of my packages rstan, it is now all up and running! So immediate problem solved thank you!

1 Like

The Ubuntu tutorials, such as this one of the command line will provide sources for detailed answers.

  • PPAs are sources of system programming tools, especially code libraries that can be incorporated into other programs.
  • A package is a collection of programs or program pieces in compiled form.
  • root is either the / directory of which all directories are subdirectories or it is the superuser id, with unlimited powers to modify the system, including completely trashing it if used carelessly
  • sudo allows a user to temporarily acquire root privileges
  • -t -y things?
  • repos are central storage facilities for packages generally; they may be system wide or application specific, such as the R packages installed from CRAN or a mirror with `install.packages("x")
    *Dependencies are source or compiled code required for a given package to compile
    *Compiling translates human readable code (or pre-compiled pieces of such code) into programs that can be run on the computer
  • Source code is human readable
  • Headers are human readable code that are incorporated into other source code

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.