How to update gcc on Amazon Linux 2023

0

As far as I know, AL2023 uses GCC 11.x. However, I'd need GCC 13.x. How can I upgrade it?

質問済み 4ヶ月前622ビュー
1回答
0
承認された回答

Hello.

I think you can use gcc13 by installing gcc itself from source.
I confirmed that I can install it by running the following command in my environment.
Please note that the installation will take some time.
If you want to shorten the time, add "--disable-bootstrap" to the "./configure" command option to reduce the number of builds.

dnf install gcc g++ -y
wget https://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-13.2.0/gcc-13.2.0.tar.gz
tar xzf gcc-13.2.0.tar.gz
cd gcc-13.2.0
./contrib/download_prerequisites
mkdir build
cd build
../configure --enable-languages=c,c++ --prefix=/usr/local --disable-multilib --disable-bootstrap
make
make install
reboot
gcc -v
g++ -v
profile picture
エキスパート
回答済み 4ヶ月前
profile pictureAWS
エキスパート
レビュー済み 4ヶ月前
  • Thank you very much for your answer!

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ