diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3554214cf58c47ffe2590378ba2c2e930e63aa60..1233cfed17d477ccdc46cc5c5fd08ab4e39d7ad2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -83,8 +83,10 @@ test_centos_gcc_version:
         #- echo "source /opt/rh/devtoolset-8enable" >> ~/.bashrc
 
     script:
+        - yum install centos-release-scl
+        - yum install devtoolset-7-gcc devtoolset-7-gcc-c++
+        - scl enable devtoolset-7 -- bash
         - cat ~/.bashrc
-        - scl enable devtoolset-8 'bash'
         - gcc --version
         - g++ --version
         - gfortran --version