diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1e6727c93b23684849164bba31d7bf4225196f37..20795589f3e39f94ddbe68546815da1893d1fc31 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -17,6 +17,7 @@ cache:
 before_script:
   - mkdir -p $R_LIBS_USER
   - echo "R_LIBS='$R_LIBS_USER'" > .Renviron
+  - apt-get update && apt-get install -y libstdc++6
   - R -q -e 'remotes::install_deps(dependencies = TRUE)'
 
 .R-devel:
@@ -38,7 +39,7 @@ before_script:
     refs:
       - tags
       - schedules
-  image: rocker/geospatial:4
+  image: rocker/geospatial:4.1
   variables:
     R_VERSION: oldrel
   before_script: