Help us understand the problem. What is going on with this article?

CentOS 7にgcc 7をインストール(SCL)

はじめに

Software Collection(SCL)を利用してCentOS7にgcc7をインストール
参考:Quick Start — Software Collections

サポート

本手法で導入した場合、Red Hat Software Collections Product Life Cycle - Red Hat Customer Portalより、2019-10がEOLだと思われる。
それ以降に報告された脆弱性や不具合への対応は実施されない可能性がある。

LOG

レポジトリ登録

# yum install -y centos-release-scl

インストール

# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)

# yum install -y devtoolset-7
# scl enable devtoolset-7 bash
... 略

gcc gcc-c++だけほしい時

# yum install -y devtoolset-7-gcc devtoolset-7-gcc-c++
# scl enable devtoolset-7 bash
... 略

各種確認

# which gcc
/opt/rh/devtoolset-7/root/usr/bin/gcc

# gcc --version
gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
Copyright (C) 2017 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 devtoolset-7
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: ftp.jaist.ac.jp
 * centos-sclo-rh: ftp.jaist.ac.jp
 * centos-sclo-sclo: ftp.jaist.ac.jp
 * extras: ftp.jaist.ac.jp
 * updates: ftp.jaist.ac.jp
Installed Packages
Name        : devtoolset-7
Arch        : x86_64
Version     : 7.1
Release     : 4.el7
Size        : 2.2 k
Repo        : installed
From repo   : centos-sclo-rh
Summary     : Package that installs devtoolset-7
License     : GPLv2+
Description : This is the main package for devtoolset-7 Software Collection.

# yum info devtoolset-7-gcc
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: ftp.jaist.ac.jp
 * centos-sclo-rh: ftp.jaist.ac.jp
 * centos-sclo-sclo: ftp.jaist.ac.jp
 * extras: ftp.jaist.ac.jp
 * updates: ftp.jaist.ac.jp
Installed Packages
Name        : devtoolset-7-gcc
Arch        : x86_64
Version     : 7.3.1
Release     : 5.15.el7
Size        : 67 M
Repo        : installed
From repo   : centos-sclo-rh
Summary     : GCC version 7
URL         : http://gcc.gnu.org
License     : GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
Description : The devtoolset-7-gcc package contains the GNU Compiler Collection version 7.

# yum info devtoolset-7-gcc-c++
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: ftp.jaist.ac.jp
 * centos-sclo-rh: ftp.jaist.ac.jp
 * centos-sclo-sclo: ftp.jaist.ac.jp
 * extras: ftp.jaist.ac.jp
 * updates: ftp.jaist.ac.jp
Installed Packages
Name        : devtoolset-7-gcc-c++
Arch        : x86_64
Version     : 7.3.1
Release     : 5.15.el7
Size        : 27 M
Repo        : installed
From repo   : centos-sclo-rh
Summary     : C++ support for GCC version 7
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 7.  It includes support for most of the current C++ specification
            : and a lot of support for the upcoming C++ specification.
witchcraze
個人用wiki代わりのメモを淡々と...
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした