CentOS 6.7 Upgrade GCC to 5.2.0

Source: Internet
Author: User

CentOS 6.7 comes with the GCC version is 4.4.7, does not support C++11, manual upgrade, the current GCC version is the latest 5.2

1. Download the source package
wget http://mirrors.concertpass.com/gcc/releases/gcc-5.2.0/gcc-5.2.0.tar.bz2

2. Decompression
Tar jxvf gcc-5.2.0.tar.bz2

3. Automatic installation dependent

CD gcc-5.2.0
./contrib/download_prerequisites


4. Create a temporary directory to store intermediate files during compilation
mkdir gcc-build-5.2.0
CD gcc-build-5.2.0
.. /configure--enable-checking=release--enable-languages=c,c++--disable-multilib


5. Make

6. Sudo make install

7. View the new g++ version

[[Email protected]_test gcc-5.2.0]$ g++-V
Using built-in specs.
collect_gcc=g++
Collect_lto_wrapper=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/5.2.0/lto-wrapper
Target:x86_64-unknown-linux-gnu
Configured with:.. /configure--enable-checking=release--enable-languages=c,c++--disable-multilib
Thread Model:posix
GCC version 5.2.0 (GCC)


Note that the original gcc/g++ of the system in/usr/bin/g++/USR/BIN/GCC newly installed GCC in/USR/LOCAL/BIN/GCC

CentOS 6.7 Upgrade GCC to 5.2.0

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.