How do I install g++
for Fedora Linux? I have been searching the dnf
command to install g++
but didn't find anything.
How do I install it?
I have already installed gcc
Since Fedora 22 yum has been deprecated so the commands given in other answers will actually fire up 'Dandified yum' i.e. dnf
. So the new command to install g++ in recent distributions is
su -c "dnf install gcc-c++"
As of Nov 2015 this installs the 5.1.1 version.
Also note that in Fedora 23 when I gave the command g++ -v
, Fedora automatically asked me if I want to install gcc-c++ package. I think thats nice.(After the install it also ran the command g++ -v
for me)
Only nit pick that I can do about it is that instead of a progress indicator you just get * Downloading packages...
message which you may not like if you are on a slow internet connection.
g++-4.7
(org++-4.6
). – Basile Starynkevitch