10월, 2021의 게시물 표시

Install latest gcc, g++ on CentOS7

 To install development tools on CentOS7, generally use the following command. yum groupinstall "Development Tools" However, RedHat or CentOS Linux tends to prefer older packages with proven stability over newer ones. Therefore, package versions are often lower than Ubuntu. If you check the version after installing gcc, it is 4.8.5. [ root@localhost ~ ] # gcc --version gcc ( GCC ) 4.8.5 20150623 ( Red Hat 4.8.5-36 ) Copyright ( C ) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. However, sometimes you need to upgrade your gcc or g++ version to build a package that requires the latest c++(for exasmple c++ 14) syntax. However, it is impossible to upgrade gcc to a higher version with yum update. You will have to build the source code or find another way to install it. Install The Software Collections ( SCL ) Repository first....