Software Collections (SCL) is a CentOS repository that provides a set of dynamic programming languages, database servers, and various related packages. Provided software versions are […] more recent than their equivalent versions included in the base CentOS distribution […] Packages available from the SCL […] can be optionally enabled per application by using supplied
scl
utility.
To list all Software Collections installed on the development nodes, use:
[alice@dev2 ~]$ scl --list
devtoolset-10
devtoolset-11
devtoolset-7
devtoolset-8
devtoolset-9
llvm-toolset-7
rh-python36
rh-python38
rh-ruby25
rh-ruby26
rh-ruby27
rh-ruby30
Importantly, only a subset of the above SCLs are available also on the compute nodes.
To list all the packages that are part of one or more of these SCLs, use:
[alice@dev2 ~]$ scl --list rh-ruby25
rh-ruby25-rubygem-io-console-0.4.6-9.el7.x86_64
rh-ruby25-rubygem-json-2.1.0-9.el7.x86_64
rh-ruby25-rubygems-2.7.6.3-9.el7.noarch
rh-ruby25-runtime-2.5-2.el7.x86_64
rh-ruby25-rubygem-openssl-2.1.2-9.el7.x86_64
rh-ruby25-2.5-2.el7.x86_64
rh-ruby25-ruby-irb-2.5.9-9.el7.noarch
rh-ruby25-rubygem-did_you_mean-1.2.0-9.el7.noarch
rh-ruby25-rubygem-bigdecimal-1.3.4-9.el7.x86_64
rh-ruby25-ruby-2.5.9-9.el7.x86_64
rh-ruby25-ruby-libs-2.5.9-9.el7.x86_64
rh-ruby25-rubygem-psych-3.0.2-9.el7.x86_64
rh-ruby25-rubygem-rdoc-6.0.1.1-9.el7.noarch
Ruby’s interactive shell can be launched via the irb
command. However, because it is available as a core software, we need to access it via the Ruby SCL. Here is an example how to check the version of the Ruby shell:
[alice@dev2 ~]$ scl enable rh-ruby25 "irb --version"
irb 0.9.6(09/06/30)
Importantly, this approach of prefixing the original command call works also in job scripts.
If you work interactively on one of the development nodes, you can also launch a new shell (typically Bash) with one or more SCLs enabled:
[alice@dev2 ~]$ scl enable rh-ruby25 $SHELL
[alice@dev2 ~]$ irb --version
irb 0.9.6(09/06/30)
To “unload” an SCLs, just return to the previous shell by exiting new SCL-enabled shell, i.e.
[alice@dev2 ~]$ exit
[alice@dev2 ~]$
The devtoolset-NN
SCLs each include a specific version of the GNU Compiler Collection (GCC), which provides the gcc
compiler among other tools. Here are the gcc
versions provided by these SCLs:
[alice@dev2 ~]$ scl enable devtoolset-7 "gcc --version | head -1"
gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
[alice@dev2 ~]$ scl enable devtoolset-8 "gcc --version | head -1"
gcc (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3)
[alice@dev2 ~]$ scl enable devtoolset-9 "gcc --version | head -1"
gcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2)
[alice@dev2 ~]$ scl enable devtoolset-10 "gcc --version | head -1"
gcc (GCC) 10.2.1 20210130 (Red Hat 10.2.1-11)
The rh-pythonNN
SCLs each include a specific version of Python. Here are the python
versions provided by these SCLs:
[alice@dev2 ~]$ scl enable rh-python36 "python --version"
Python 3.6.12
[alice@dev2 ~]$ scl enable rh-python38 "python --version"
Python 3.8.11
The rh-rubyNN
SCLs each include a specific version of Ruby. Here are the irb
versions provided by these SCLs:
[alice@dev2 ~]$ scl enable rh-ruby25 "irb --version"
irb 0.9.6(09/06/30)
[alice@dev2 ~]$ scl enable rh-ruby26 "irb --version"
irb 1.0.0 (2018-12-18)
[alice@dev2 ~]$ scl enable rh-ruby27 "irb --version"
irb 1.2.6 (2020-09-14)
[alice@dev2 ~]$ scl enable rh-ruby30 "irb --version"
irb 1.3.5 (2021-04-03)