[CentOS-devel] Problem installing gcc in CentOS stream 9

Wed Nov 10 15:38:52 UTC 2021
Florian Weimer <fweimer at redhat.com>

* Alfredo Moralejo Alonso:

> I'm having problems installing gcc in CS9:
>
> [root at eba723badadf /]# dnf install gcc
> CentOS Stream 9 - BaseOS                                                                                                                                      583 kB/s | 1.3 MB     00:02    
> CentOS Stream 9 - AppStream                                                                                                                                   1.3 MB/s | 7.7 MB     00:06    
> Error: 
>  Problem: cannot install the best candidate for the job
>   - nothing provides libgcc >= 11.2.1-6.el9 needed by gcc-11.2.1-6.el9.x86_64
>   - nothing provides libgomp = 11.2.1-6.el9 needed by gcc-11.2.1-6.el9.x86_64
>
> it seems some subpackages of gcc are missing in the repo?

Try running “dnf update” first.  If I recall correctly, “dnf install”
does not upgrade already-installed packages for dependencies.

Thanks,
Florian