@Christopher Flach , can you paste the trail when you run this in the notebook?
%sh
#!/bin/bash
 
#Start with update
sudo apt-get update
 
#######rgdal
 
#This installs gdal on the linux machine but not the R library (done in R script)
sudo apt-get install -y gdal-bin libgdal-dev
 
#To be able to install the R library, you also need libproj-dev 
sudo apt-get install -y libproj-dev 
 
##### rgeos
sudo apt install libgeos++dev