CentOS Upgrade GCC Support c++11

Source: Internet
Author: User

1. Prepare a download directory in the home directory cd/home;mkdir download
2. Enter the/home/download directory and download gcc-4.8.2 wget http://gcc.skazkaforyou.com/releases/gcc-4.8.2/gcc-4.8.2.tar.gz.
3. Unzip the downloaded compressed package TAR-XZVF gcc-4.8.2.tar.gz;
4. Enter the library after the compressed directory CD gcc-4.8.2
5. Create a new compilation directory mkdir Gcc-build
6. Prepare the dependent Library,./contrib/download_prerequisites; it's better not to go into the contrib directory to execute download_prerequisites, or else make the error in the next step, indicating the missing relevant library
7../configure--preix=/usr/gcc482--enable-threads=posix--disable-checking--disable-multilib--enable-languages=c , C + + Note that if there is an error here, read 6 carefully and repeat the operation.
7. Make-j 4
8. Make Install
9. (recommended) Remove old version yum remove gcc
10. Establish a soft connection (here is 64 environment, 32 words similar) ln-s/USR/GCC482/BIN/GCC/USR/BIN/GCC
Ln-s/usr/gcc482/bin/g++/usr/bin/g++

Gcc-v found that it should be updated.
12. View Strings/usr/lib64/libstdc++.so.6|grep Glibcxx
Output

cp/usr/gcc482/lib64/libstdc++.so.6.0.18/usr/lib64/.
Rm-rf/usr/lib64/libstdc++.so.6.
Ln-sf/usr/lib64/libstdc++.so.6.0.18/usr/lib64/libstdc++.so.6.

16. View Strings/usr/lib64/libstdc++.so.6|grep Glibcxx

Output

17. Hold on to your practice.

CentOS Upgrade GCC Support c++11

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.