Mostly a note-to-self.

After you’ve installed r-base on Ubuntu with the default packages, you will have issues installing Tidyverse. It’s because there are a bunch of packages missing.

Install them with:

sudo apt install libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev libharfbuzz-dev libfribidi-dev libfontconfig1-dev libxml2-dev libssl-dev libcurl4-openssl-dev

There might also be the following r packages missing

stringi
ragg

Install them with

sudo su - -c "R -e \"install.packages('stringi', repos='http://cran.rstudio.com/')\""
sudo su - -c "R -e \"install.packages('ragg', repos='http://cran.rstudio.com/')\""