diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1bc50e665c00b23c53ef16812db92fba158991c2..464ce2402377ddacbf94a9147aa958ebbd9bdf3d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -276,6 +276,8 @@ build_test-clang-8:
 # normal pipeline for each commit
 .example:
   stage: example
+  before_script:
+    - apt-get -qq update && apt-get -qq install -y gdb
   tags:
     - corsika
   script:
@@ -330,6 +332,8 @@ example-clang-8:
   stage: build_test_example
   tags:
     - corsika
+  before_script:
+    - apt-get -qq update && apt-get -qq install -y gdb
   script:
     - cd build
     - cmake --build . -- -j4
@@ -439,6 +443,8 @@ install-clang-8:
   stage: optional
   tags:
     - corsika
+  before_script:
+    - apt-get -qq update && apt-get -qq install -y gdb
   script:
     - cd build
     - cmake .. -DCMAKE_BUILD_TYPE=Release