0

For example on el7:

  • to develop an nvidia CUDA application you need a newer gcc than the default gcc version 4.8.x and to get the newer version you would use a software repo called "Software Collections" (SCL)
  • the base python3 is 3.6 and you need newer python modules and so you install python3.8 from SCL

Starting on el8, and el9: the SCL is deprecated and so there is a different method for installing and configuring newer versions of gcc and python3.

On el8/el9/newer, how do you get newer versions of software like python3, gcc, java, etc?

Trevor Boyd Smith
  • 18,164
  • 32
  • 127
  • 177

1 Answers1

0

in a nutshell, here are some examples for how to install and configure

  • for python3 to get python3.9: dnf install -y python39 && alternatives --set python3 $(command -v python3.9)
  • for gcc to get gcc-12: dnf install gcc-toolset-12 && source scl_source enable gcc-toolset-12
  • for java to get java-17: dnf install java-17 && bin_java_filename=$(rpm -qa|grep java-17|xargs rpm -ql|grep "bin\/java$"|head -1) && alternatives --set java ${bin_java_filename}
  • tested on rocky8, rocky9

which repo has the newer software versions?

how to: install newer software versions?

  • for python3: dnf install python39
  • for gcc: dnf install gcc-toolset-12

how to: change the system default?

  • for python3: alternatives --set python3 $(command -v python3.9)
  • for gcc:

p.s. what is the difference between alternatives and update-alternatives?

  • the original tool is called update-alternatives and is from Debian linux distro
  • in EnterpriseLinux, Redhat rewrote the tool and called it alternatives and when you install alternatives the package also installs a symlink with name update-alternatives on your env var PATH to help you find the tool
  • the two are similar but not the same because their source code is different
Trevor Boyd Smith
  • 18,164
  • 32
  • 127
  • 177