RHEL 8에 gcc 9 설치 (AppStream)

RHEL 8에 gcc 9 설치 (AppStream)

2022-10-03 last update

7 minutes reading RHEL8 GCC appstream

소개



Application Stream (AppStream)을 사용하여 RHEL8에 gcc9 설치
참고 : RHEL 8에서 애플리케이션 개발 Red Hat Enterprise Linux 8 | Red Hat Customer Portal

지원



본 수법으로 도입한 경우, Red Hat Enterprise Linux 8 Application Streams Life Cycle - Red Hat Customer Portal 보다, 2021-11이 EOL이라고 생각된다.
그 이후에 보고된 취약성이나 결함에 대한 대응은 실시되지 않을 가능성이 있다.

LOG



설치


# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.1 (Ootpa)

# yum install -y gcc-toolset-9
... 略
# scl enable gcc-toolset-9 bash

각종 확인


# which gcc
/opt/rh/gcc-toolset-9/root/usr/bin/gcc

# gcc --version
gcc (GCC) 9.1.1 20190605 (Red Hat 9.1.1-2)
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# yum info gcc-toolset-9
Updating Subscription Management repositories.
Unable to read consumer identity
Subscription Manager is operating in container mode.
Last metadata expiration check: 0:02:45 ago on Wed Nov 13 10:06:14 2019.
Installed Packages
Name         : gcc-toolset-9
Version      : 9.0
Release      : 3.el8
Architecture : x86_64
Size         : 2.1 k
Source       : gcc-toolset-9-9.0-3.el8.src.rpm
Repository   : @System
From repo    : rhel-8-for-x86_64-appstream-rpms
Summary      : Package that installs gcc-toolset-9
License      : GPLv2+
Description  : This is the main package for gcc-toolset-9 Software Collection.

# yum info gcc-toolset-9-gcc
Updating Subscription Management repositories.
Unable to read consumer identity
Subscription Manager is operating in container mode.
Last metadata expiration check: 0:03:24 ago on Wed Nov 13 10:06:14 2019.
Installed Packages
Name         : gcc-toolset-9-gcc
Version      : 9.1.1
Release      : 2.4.el8
Architecture : x86_64
Size         : 75 M
Source       : gcc-toolset-9-gcc-9.1.1-2.4.el8.src.rpm
Repository   : @System
From repo    : rhel-8-for-x86_64-appstream-rpms
Summary      : GCC version 9
URL          : http://gcc.gnu.org
License      : GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
Description  : The gcc-toolset-9-gcc package contains the GNU Compiler Collection version 9.

# yum info gcc-toolset-9-gcc-c++
Updating Subscription Management repositories.
Unable to read consumer identity
Subscription Manager is operating in container mode.
Last metadata expiration check: 0:04:02 ago on Wed Nov 13 10:06:14 2019.
Installed Packages
Name         : gcc-toolset-9-gcc-c++
Version      : 9.1.1
Release      : 2.4.el8
Architecture : x86_64
Size         : 31 M
Source       : gcc-toolset-9-gcc-9.1.1-2.4.el8.src.rpm
Repository   : @System
From repo    : rhel-8-for-x86_64-appstream-rpms
Summary      : C++ support for GCC  version 9
URL          : http://gcc.gnu.org
License      : GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
Description  : This package adds C++ support to the GNU Compiler Collection
             : version 9.  It includes support for most of the current C++ specification
             : and a lot of support for the upcoming C++ specification.