I used following steps on CentOS-7 and they worked fine for me:
yum install centos-release-scl
yum install devtoolset-10
scl enable devtoolset-10 bash
I used same flags which you used:
g++ -std=c++2a -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/dummy2.d" -MT"src/dummy2.o" -o "src/dummy2.o" "../src/dummy2.cpp"
Answer from Ashish Shirodkar on Stack Overflowc++ - How to enable later versions of GCC in eclipse CDT in CentOS 7 - Stack Overflow
Installing devtoolset-X
g++ - How can I install devtoolset on the workstation edition of RHEL7 - Stack Overflow
Where do I get "Development Tools" for CentOS 7 when trying to install via yum? - Unix & Linux Stack Exchange
On CentOS I can do yum install devtoolset-8 followed by scl enable devtoolset-8 bash so that my paths are setup to use GCC et al packaged with that development toolset.
Is there an equivalent in AlmaLinux?
In your console output it says: Maybe run: yum groups mark install (see man yum)—did you do this?
Try running the following commands:
yum groups mark install "Development Tools"
yum groups mark convert "Development Tools"
yum groupinstall "Development Tools"
Reference: RedHat Customer Portal discussion
Try:
yum group list
To see if yum can find the Development Tools under Available Groups.
If it fails, try:
yum clean all
yum group list
And see if it can find it. If it still fails, you might not have the correct mirrors enabled to resolve it.
try the clean command again and then:
yum --disablerepo=\* --enablerepo=base,updates group list
If you can find it. Great! Install with:
yum --disablerepo=\* --enablerepo=base,updates groupinstall "Development Tools"
If not so, can you give us the output of:
yum repolist all
EDIT:
Thank you for the output.
I found an article which state the following: "To install the CentOS Development tools, you will need to be able to connect to your Virtual Server using SSH, and work as the root user."
Try switching to user "root" (if you don't know the root login credentials, you can try sudo su. sudo also might work but I see you already have tried that...) and running the above commands.
Lastly, you can try and enable these "sources" repos:
- CentOS-7 - Base Sources
- CentOS-7 - Extras Sources
- CentOS-7 - Updates Sources
And than running yum update followed by groupinstall.
Let me know if that doesn't work. Good luck!
Install it by:
sudo yum install centos-release-scl
sudo yum install devtoolset-4
The first command installs and enables Software Collections Repository on your CentOS machine. That repository provides the devtoolset package.
This does not work on CentOS 6.10 anymore.
Those are the ones available without jumping through hoops:
[misp@misp-centos6 ~]$ yum search devtoolset |grep devtoolset|awk {'print $1'} |cut -f 1,2 -d\-|sort|uniq
===========================
devtoolset-6
devtoolset-6.x86_64
devtoolset-7
devtoolset-7.x86_64