0

This is on a fedora 32 box. Seeing a strange problem with dnf when installing packages that require gcc. Repos are updated and the latest gcc is available.

$ sudo dnf list gcc --showduplicates
Last metadata expiration check: 0:05:51 ago on Fri 30 Oct 2020 11:45:06 AM PDT.
Available Packages
gcc.x86_64                                            10.0.1-0.11.fc32                                            Fedora32        
gcc.x86_64                                            10.2.1-6.fc32                                               Fedora32-UPDATES

However, when I try to install a package that pulls in gcc, it wants to install the older version.

$ sudo dnf install stack
Last metadata expiration check: 0:07:23 ago on Fri 30 Oct 2020 11:45:06 AM PDT.
Dependencies resolved.
==================================================================================================================================
 Package                                 Architecture        Version                          Repository                     Size
==================================================================================================================================
Installing:
 stack                                   x86_64              2.1.3.1-3.fc32                   Fedora32-UPDATES              7.5 M
Upgrading:
 libxcrypt                               x86_64              4.4.17-1.fc32                    Fedora32-UPDATES              124 k
Installing dependencies:
 binutils                                x86_64              2.34-5.fc32                      Fedora32-UPDATES              5.4 M
 binutils-gold                           x86_64              2.34-5.fc32                      Fedora32-UPDATES              852 k
 cpp                                     x86_64              10.0.1-0.11.fc32                 Fedora32                      9.4 M
 elfutils-debuginfod-client              x86_64              0.181-1.fc32                     Fedora32-UPDATES               33 k
 gcc                                     x86_64              10.0.1-0.11.fc32                 Fedora32                       30 M
 glibc-devel                             x86_64              2.31-4.fc32                      Fedora32-UPDATES              1.0 M
 glibc-headers                           x86_64              2.31-4.fc32                      Fedora32-UPDATES              457 k
 gmp-c++                                 x86_64              1:6.1.2-13.fc32                  Fedora32                       18 k
 gmp-devel                               x86_64              1:6.1.2-13.fc32                  Fedora32                      171 k
 isl                                     x86_64              0.16.1-10.fc32                   Fedora32                      872 k
 kernel-headers                          x86_64              5.8.11-200.fc32                  Fedora32-UPDATES              1.2 M
 libmpc                                  x86_64              1.1.0-8.fc32                     Fedora32                       59 k
 libpkgconf                              x86_64              1.6.3-3.fc32                     Fedora32                       35 k
 libxcrypt-devel                         x86_64              4.4.17-1.fc32                    Fedora32-UPDATES               32 k
 pkgconf                                 x86_64              1.6.3-3.fc32                     Fedora32                       41 k
 pkgconf-m4                              noarch              1.6.3-3.fc32                     Fedora32                       14 k
 pkgconf-pkg-config                      x86_64              1.6.3-3.fc32                     Fedora32                      9.7 k
Downgrading:
 libgomp                                 x86_64              10.0.1-0.11.fc32                 Fedora32                      246 k

Transaction Summary
==================================================================================================================================
Install    18 Packages
Upgrade     1 Package
Downgrade   1 Package

When I explicitly specify gcc, then it correctly installs the latest version.

$ sudo dnf install stack gcc
Last metadata expiration check: 0:08:21 ago on Fri 30 Oct 2020 11:45:06 AM PDT.
Dependencies resolved.
==================================================================================================================================
 Package                                  Architecture         Version                       Repository                      Size
==================================================================================================================================
Installing:
 gcc                                      x86_64               10.2.1-6.fc32                 Fedora32-UPDATES                30 M
 stack                                    x86_64               2.1.3.1-3.fc32                Fedora32-UPDATES               7.5 M
Upgrading:
 libgcc                                   x86_64               10.2.1-6.fc32                 Fedora32-UPDATES                99 k
 libgomp                                  x86_64               10.2.1-6.fc32                 Fedora32-UPDATES               260 k
 libxcrypt                                x86_64               4.4.17-1.fc32                 Fedora32-UPDATES               124 k
Installing dependencies:
 binutils                                 x86_64               2.34-5.fc32                   Fedora32-UPDATES               5.4 M
 binutils-gold                            x86_64               2.34-5.fc32                   Fedora32-UPDATES               852 k
 cpp                                      x86_64               10.2.1-6.fc32                 Fedora32-UPDATES               9.4 M
 elfutils-debuginfod-client               x86_64               0.181-1.fc32                  Fedora32-UPDATES                33 k
 glibc-devel                              x86_64               2.31-4.fc32                   Fedora32-UPDATES               1.0 M
 glibc-headers                            x86_64               2.31-4.fc32                   Fedora32-UPDATES               457 k
 gmp-c++                                  x86_64               1:6.1.2-13.fc32               Fedora32                        18 k
 gmp-devel                                x86_64               1:6.1.2-13.fc32               Fedora32                       171 k
 isl                                      x86_64               0.16.1-10.fc32                Fedora32                       872 k
 kernel-headers                           x86_64               5.8.11-200.fc32               Fedora32-UPDATES               1.2 M
 libmpc                                   x86_64               1.1.0-8.fc32                  Fedora32                        59 k
 libpkgconf                               x86_64               1.6.3-3.fc32                  Fedora32                        35 k
 libxcrypt-devel                          x86_64               4.4.17-1.fc32                 Fedora32-UPDATES                32 k
 pkgconf                                  x86_64               1.6.3-3.fc32                  Fedora32                        41 k
 pkgconf-m4                               noarch               1.6.3-3.fc32                  Fedora32                        14 k
 pkgconf-pkg-config                       x86_64               1.6.3-3.fc32                  Fedora32                       9.7 k

Transaction Summary
==================================================================================================================================
Install  18 Packages
Upgrade   3 Packages

Anyone have any idea what's going on here? Thanks in advance.

1
  • 1
    Those aren’t the name of the Fedora repos in the packaged Fedora repo files. I assume you are doin something fishy with your custom repos, such as setting a different cost per repo?
    – jsbillings
    Commented Nov 1, 2020 at 2:12

1 Answer 1

0

I guess that the dependency resolver chose the former as he does not need to upgrade two packages ( libgcc, libgomp). If you run the same command with --best I guess you will get the same result as with the later run.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .