diff --git a/gitlab/before_build.sh b/gitlab/before_build.sh
index e9c69895b2f4907ae1881f712df05c2cc756b288..86a45993d6e67a6ab36e16fc3f512f71827c7e39 100755
--- a/gitlab/before_build.sh
+++ b/gitlab/before_build.sh
@@ -24,8 +24,8 @@ if [ -z "${use_ccache}" ]; then
   log_warn "Cannot find ccache, compiling from scratch..."
 else
   log_info "ccache installed at ${use_ccache}, caching compilations..."
-  run_cmd ln -s ${use_ccache} ${PREFIX}/bin/gcc
-  run_cmd ln -s ${use_ccache} ${PREFIX}/bin/g++
+  run_cmd ln -sf ${use_ccache} ${PREFIX}/bin/gcc
+  run_cmd ln -sf ${use_ccache} ${PREFIX}/bin/g++
 fi
 
 # Source the newly created virtualenv