R 3.5.0 installation packages for Ubuntu Xenial (16.04) do not yet exist on the ubuntu mirror sites. Is there an alternative method for updating R to 3.5.0 on ubuntu xenial? Alternatively, is there a different method to update R to 3.5.0?
R 3.5.0 installation packages for Ubuntu Xenial (16.04) do not yet exist on the ubuntu mirror sites. Is there an alternative method for updating R to 3.5.0 on ubuntu xenial? Alternatively, is there a different method to update R to 3.5.0?
R 3.5 are currently only available from a PPA, because some of CRAN's packages have problems building with R 3.5.
Proceed at your own risk.
The procedure that worked for me is:
Remove all
r-cran-*
packages from your system (YMMV, I'm usually installing packages from source and have very few of these)dpkg -l | grep r-cran-
Add Michael Rutter's PPA:
Upgrade R
Install all packages you need from source (to a personal or site library via
install.packages()
) or by installing the correspondingr-cran-*
Ubuntu package.I use the following script to reinstall all packages my packages from my personal site library for R 3.4:
If you have a machine with multiple CPUs, you can speed up the process, for example:
References
Reply by Dirk Eddelbuettel to a similar inquiry on the R-SIG-Debian mailing list
Related SO question
The CRAN site has been updated since's @krlmlr's response in early June: https://cran.r-project.org/bin/linux/ubuntu/.
The CRAN instructions have several steps, but the summary is that the
sources.list
file should reference a repository that's specific to version 3.5.x & 3.6.x. The entry is something likedeb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/
instead of the previous (versionless) entry of
deb https://cloud.r-project.org/bin/linux/ubuntu xenial/
The relevant description from the website (which will eventually change):
edit 2019-05-13: update for last month's release of R 3.6.0.
The
xenial-cran35/
version of the repo does NOT work if you have a "default release" set in apt, as is the case in some distros that work on top of Ubuntu, such as Mint. For my Mint distro, there exists a file/etc/apt/apt.conf.d/01ubuntu
inside of which it declares theDefault-Release "xenial";
What this means is that, since r-base exists in the ubuntu repo at version 3.2, with release "xenial", it'll never use the 3.6 branch from the other repo, because the release name for that repo is "xenial-cran35". You need to edit that file to change the default release to "xenail-cran35", or do something more pointed using apt preference files (https://wiki.debian.org/AptPreferences#A.2Fetc.2Fapt.2Fpreferences).This is basically R's fault for having a poorly formatted repo. They should have had 2 repos, each of which had a "xenial" release folder, one url for their 3.2 branch work and one for the 3.5+ branch work. Instead they have one repo, and have bastardized the "release name" instead, which just sort of happens to work for base Ubuntu, but won't work if you have non-base configuration of apt in this way.
This needs to be done like so currently:
'bionic' can be changed to your version of ubuntu; check the R docs: https://cran.r-project.org/bin/linux/ubuntu/
https://stackoverflow.com/a/56378217/4549682