How To Install gcc-c++ on Fedora 36

In this tutorial we learn how to install gcc-c++ in Fedora 36. gcc-c++ is C++ support for GCC

Introduction

In this tutorial we learn how to install gcc-c++ on Fedora 36.

What is gcc-c++

This package adds C++ support to the GNU Compiler Collection. It includes support for most of the current C++ specification, including templates and exception handling.

We can use yum or dnf to install gcc-c++ on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install gcc-c++.

Install gcc-c++ on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install gcc-c++ using dnf by running the following command:

sudo dnf -y install gcc-c++

Install gcc-c++ on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install gcc-c++ using yum by running the following command:

sudo yum -y install gcc-c++

How To Uninstall gcc-c++ on Fedora 36

To uninstall only the gcc-c++ package we can use the following command:

sudo dnf remove gcc-c++

gcc-c++ Package Contents on Fedora 36

/usr/bin/c++
/usr/bin/g++
/usr/bin/i686-redhat-linux-c++
/usr/bin/i686-redhat-linux-g++
/usr/lib/.build-id
/usr/lib/.build-id/1a
/usr/lib/.build-id/1a/7d30e1c9e331347269e37cdc3a13e12d267b25
/usr/lib/.build-id/1a/7d30e1c9e331347269e37cdc3a13e12d267b25.1
/usr/lib/.build-id/1a/7d30e1c9e331347269e37cdc3a13e12d267b25.2
/usr/lib/.build-id/1a/7d30e1c9e331347269e37cdc3a13e12d267b25.3
/usr/lib/.build-id/33
/usr/lib/.build-id/33/a7bcfab614fdb1362ee0a5725ae74c7ffe194d
/usr/lib/.build-id/a1
/usr/lib/.build-id/a1/0fb30a7ee9825be83b197a4a9e88c81db8010c
/usr/lib/gcc
/usr/lib/gcc/i686-redhat-linux
/usr/lib/gcc/i686-redhat-linux/12
/usr/libexec/gcc
/usr/libexec/gcc/i686-redhat-linux
/usr/libexec/gcc/i686-redhat-linux/12
/usr/libexec/gcc/i686-redhat-linux/12/cc1plus
/usr/libexec/gcc/i686-redhat-linux/12/g++-mapper-server
/usr/share/doc/gcc-c++
/usr/share/doc/gcc-c++/ChangeLog-1993.bz2
/usr/share/doc/gcc-c++/ChangeLog-1994.bz2
/usr/share/doc/gcc-c++/ChangeLog-1995.bz2
/usr/share/doc/gcc-c++/ChangeLog-1996.bz2
/usr/share/doc/gcc-c++/ChangeLog-1997.bz2
/usr/share/doc/gcc-c++/ChangeLog-1998.bz2
/usr/share/doc/gcc-c++/ChangeLog-1999.bz2
/usr/share/doc/gcc-c++/ChangeLog-2000.bz2
/usr/share/doc/gcc-c++/ChangeLog-2001.bz2
/usr/share/doc/gcc-c++/ChangeLog-2002.bz2
/usr/share/doc/gcc-c++/ChangeLog-2003.bz2
/usr/share/doc/gcc-c++/ChangeLog-2004.bz2
/usr/share/doc/gcc-c++/ChangeLog-2005.bz2
/usr/share/doc/gcc-c++/ChangeLog-2006.bz2
/usr/share/doc/gcc-c++/ChangeLog-2007.bz2
/usr/share/doc/gcc-c++/ChangeLog-2008.bz2
/usr/share/doc/gcc-c++/ChangeLog-2009.bz2
/usr/share/doc/gcc-c++/ChangeLog-2010.bz2
/usr/share/doc/gcc-c++/ChangeLog-2011.bz2
/usr/share/doc/gcc-c++/ChangeLog-2012.bz2
/usr/share/doc/gcc-c++/ChangeLog-2013.bz2
/usr/share/doc/gcc-c++/ChangeLog-2014.bz2
/usr/share/doc/gcc-c++/ChangeLog-2015.bz2
/usr/share/doc/gcc-c++/ChangeLog-2016.bz2
/usr/share/doc/gcc-c++/ChangeLog-2017.bz2
/usr/share/doc/gcc-c++/ChangeLog-2018.bz2
/usr/share/doc/gcc-c++/ChangeLog-2019.bz2
/usr/share/doc/gcc-c++/ChangeLog-2020.bz2
/usr/share/doc/gcc-c++/ChangeLog-2021.bz2
/usr/share/doc/gcc-c++/ChangeLog.bz2
/usr/share/doc/gcc-c++/ChangeLog.ptr.bz2
/usr/share/doc/gcc-c++/ChangeLog.tree-ssa.bz2
/usr/share/man/man1/g++.1.gz

References

Summary

In this tutorial we learn how to install gcc-c++ on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).