CentOS 8.5にgcc8.5.0をインストールする
環境
# cat /etc/redhat-release
CentOS Linux release 8.5.2111
インストールの方法
1.開発パッケージをインストールします
# sudo dnf group install "Development Tools"
2.バージョンを確認します
# gcc --version gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-4) Copyright (C) 2018 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.
3.gccのマニュアルをインストールします
# sudo dnf install man-pages
4.動作確認
# vi test.c
以下の内容を追記します
#include <stdio.h>
int main()
{
printf ("Study Skill becom smart");
return 0;
}
ファイルをコンパイルします
# gcc test.c -o test
コンパイルしたファイルを実行します
# ./test
Study Skill becom smart