Skip to content
Louis Maddox edited this page Jan 25, 2021 · 1 revision

In 2021, I tried to upgrade R via what had previously worked for me (as I recall), using the Ubuntu bionic CRAN repo, and going via apt, but this failed.

Instead I built from source following the guide here which I will reproduce for my own records:

sudo apt update
sudo apt ugrade
sudo apt-get install -y g++ gfortran libreadline6-dev libx11-dev libxt-dev libpng-dev libjpeg-dev
libcairo2-dev xvfb libbz2-dev libzstd-dev liblzma-dev libcurl4-openssl-dev texinfo texlive
texlive-fonts-extra screen wget libpcre2-dev zlib1g-dev libbz2-dev liblzma-dev libpcre2-dev
libcurl4-openssl-dev openjdk-11-jdk make
cd /usr/local/src
sudo wget https://cran.rstudio.com/src/base/R-4/R-4.0.3.tar.gz
sudo su
tar zxvf R-4.0.3.tar.gz
cd R-4.0.3
./configure --enable-R-shlib
make
make install
cd ..
rm -rf R-4.0.3*
exit
cd
Clone this wiki locally