dnf 설치는 이전 gcc를 종속성으로 가져옵니다.

dnf 설치는 이전 gcc를 종속성으로 가져옵니다.

이것은 Fedora 32 상자에 있습니다. gcc가 필요한 패키지를 설치할 때 dnf에 이상한 문제가 발생합니다. 저장소가 사용 가능한 최신 gcc로 업데이트되었습니다.

$ 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

그런데 gcc를 가져오는 패키지를 설치하려고 하면 이전 버전을 설치하려고 합니다.

$ 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

gcc를 명시적으로 지정하면 최신 버전이 올바르게 설치됩니다.

$ 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

여기서 무슨 일이 일어나고 있는지 아는 사람 있나요? 미리 감사드립니다.

답변1

종속성 해결 프로그램은 두 패키지(libgcc, libgomp)를 모두 업그레이드할 필요가 없었기 때문에 전자를 선택한 것 같습니다. 동일한 명령을 실행하면 --best나중에 실행한 것과 동일한 결과를 얻을 수 있다고 생각합니다.

관련 정보