Try using the "pak" package to install. I was having the same exact issue until I came across this suggestion here: https://forum.posit.co/t/tidyverse-and-gdal-based-packages-doent-work-in-shiny-with-docker/189389/2