My intention is to source devtoolset-4 on Jenkins and for all users. So, if I login to the VM which hosts Jenkins and do source /opt/rh/devtoolset-4/enable
from the command line, all works fine.
So, my idea was to include this sentence in /etc/bashrc
however I get this error in Jenkins:
+++ source /opt/rh/devtoolset-4/enable
++++ test -e /opt/rh/rh-java-common/enable
++++ . scl_source enable rh-java-common
+++++ _scl_source_help='Usage: source scl_source <action> [<collection> ...]
Don'\''t use this script outside of SCL scriptlets!
which does not make any sense since scl_source enable rh-java-common
works normally and so does scl_source enable devtoolset-4
.
What am I missing?
The solution for me was sourcing (
source /opt/rh/devtoolset-4/enable
) right after login of the machine.