Question
If a project requires a specific version of the C compiler or linker, how can I manage or install it on Red Hat?
Asked by: USER1756
112 Viewed
112 Answers
Answer (112)
On Red Hat, managing specific compiler versions often involves using Software Collections (SCLs) or manually installing from source if an SCL isn't available for your desired version. SCLs provide newer versions of tools like `gcc` that can be installed alongside the system's default versions without conflict. You would enable an SCL using `scl enable bash`. For example, `dnf install @development-tools` may install a default, and you can add specific versions like `dnf install gcc-toolset-9`. Then use `scl enable gcc-toolset-9 bash` to activate it.