Can I install a recent gcc from binaries on Amazon Linux?
I'm using Amazon Linux on an EC2 instance started from the most recent 2017.03 AMI (ami-6df1e514).
This distribution comes with g++
4.8.3 from 2013. I need something more recent that can compile C++14.
Is there any way to install a more recent gcc
from some sort of binaries, or am I stuck compiling it from source?
I'm not seeing anything in the Amazon repos that looks recent:
[ec2-user@ip-... ~]$ yum list \*gcc\*
Loaded plugins: priorities, update-motd, upgrade-helper
Installed Packages
gcc.noarch 4.8.3-3.20.amzn1 @amzn-main
gcc-c++.noarch 4.8.3-3.20.amzn1 @amzn-main
gcc-gfortran.noarch 4.8.3-3.20.amzn1 @amzn-main
gcc48.x86_64 4.8.3-9.111.amzn1 @amzn-main
gcc48-c++.x86_64 4.8.3-9.111.amzn1 @amzn-main
gcc48-gfortran.x86_64 4.8.3-9.111.amzn1 @amzn-main
libgcc48.x86_64 4.8.3-9.111.amzn1 installed
Available Packages
gcc-gnat.noarch 4.8.3-3.20.amzn1 amzn-main
gcc44.x86_64 4.4.6-4.81.amzn1 amzn-main
gcc44-c++.x86_64 4.4.6-4.81.amzn1 amzn-main
gcc44-gfortran.x86_64 4.4.6-4.81.amzn1 amzn-main
gcc44-gnat.x86_64 4.4.6-4.81.amzn1 amzn-main
gcc44-objc.x86_64 4.4.6-4.81.amzn1 amzn-main
gcc44-objc++.x86_64 4.4.6-4.81.amzn1 amzn-main
gcc48-gnat.x86_64 4.8.3-9.111.amzn1 amzn-main
gcc48-plugin-devel.x86_64 4.8.3-9.111.amzn1 amzn-main
libgcc44.i686 4.4.6-4.81.amzn1 amzn-main
libgcc44.x86_64 4.4.6-4.81.amzn1 amzn-main
libgcc48.i686 4.8.3-9.111.amzn1 amzn-main
Is there an alternative, testing repo or something that contains more recent packages?
Use the new Amazon Linux 2 at https://aws.amazon.com/amazon-linux-2/ which has gcc v7.2.1 in it's default repo.