I want to run c++ on my centos machine. My Google searches says that run yum group install "Development Tools"
command but this downloads other packages too like bison,perl,automake, etc which is not required for my use-case and only increases my docker container size. Can someone suggest the necessary packages required to run c++ ?
TIA
2
Answers
The only necessary tool to "run" C++ (aka build C++) is a compiler:
Sure, you can:
This will install default gcc version supplied by your distro.
If you are on RHEL 7 and/or CentOS 7, the default gcc version is quite outdated (4.8.5), so you may want to install "devtoolset-N", which provide newer GCC versions, via Software Collections, for example look at this one. In there, in my experience, installing the devtoolset-N package will install the whole buch of stuff, similar to what
groupinstall "Development Tools"
does, so for Docker container it is good enough to only installdevtoolset-N-toolchain
. I also once neededdevtoolset-N-libatomic-devel
.