Rocky Linux 9 comes with GCC11, however I would like to use previous GCC versions (i.e.: GCC8 or GCC10). There is a lot of documentation related to Ubuntu or CentOS, but I could not find any based on dnf package manager.
I have also tried to install it from sources but I was not able to solve all the dependencies.