I had to upgrade to Fedora 42, but now the default GCC is 15, and I have some code that does not compile with it (the code is at fault, but I cannot modify it).
So, I found this page which mentions, correctly, that package gcc-14
exists, and I installed it. Now I want this GCC to be the default one.
The page suggests this:
- Using the alternatives system:
sudo alternatives --config gcc
This displays a menu allowing you to select the default gcc command.
But this does not work at all for me: running the command does nothing, and alternatives --list
does not even contain gcc
anywhere.
Is that page some kind of AI-bullshit that sometimes gets it right, sometimes hallucinates things? Is alternatives
supposed to help here?
Otherwise, is there a way of getting gcc-14
as default replacement for gcc
on Fedora 42, other than some manual hack?