I found some instructions for installing up to date versions of R but they're all incredibly complicated. I tried them nonetheless, but they didn't work. Is there really no clicky way to get this done?
I tried
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran36/'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo apt update
with two different URLs and always get stuff like
Get:21 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ Packages [51.4 kB]
Reading package lists... Done
E: The repository 'http://www.stats.bris.ac.uk/R/bin/linux/ubuntu bionic/ Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://archive.canonical.com precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
E: The repository 'http://archive.canonical.com precise Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
(I also tried it with --allow-unauthenticated even though it feels uncomfortable having to do this, but that didn't change anything.)
I also tried
sudo echo "deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/" >> /etc/apt/sources.list
but that also didn't help. (this required me to chown that file. This is ridiculous)
By the way, the r-project website itself says stuff like ``To obtain the latest R 3.4 packages, add an entry like
deb https://cloud.r-project.org/bin/linux/ubuntu xenial/
``
Finally, not surprisingly, trying to install from source also crashes with the message
Configure: error: Maybe check LDFLAGS for paths to Fortran libraries?
I need R3.6 because some software I need to run requires it. It almost seems like R3.6 doesn't exist from googling though.
Your error is in the repository you are adding.
https://cloud.r-project.org/bin/linux/ubuntu bionic-cran36/
Use the bionic-cran35 repository. R3.6 will install fine on ubuntu 18. You can find the instructions on digitalocean
https://www.digitalocean.com/community/tutorials/how-to-install-r-on-ubuntu-18-04-quickstart
On a previous machine in the spring of 19 I used the 36 repository too, before 35 had r3.6. I ended up installing the 19.10 packages, and that worked ok. I just removed them, and correctly install r3.6 on my machine using the appropriate repository today.