CentOS 6.5 Upgrade GCC 4.9.1

Source: Internet
Author: User
Tags bz2 centos

CentOS the GCC version is too low and my system is gcc-4.7.7 and needs to be upgraded.

1. Download gcc 4.9.1 source code

URL: http://www.linuxfromscratch.org/blfs/view/svn/general/gcc.html

wget http://ftp.gnu.org/gnu/gcc/gcc-4.9.1/gcc-4.9.1.tar.bz2


2. Extract source code

Tar jxvf gcc-4.9.1.tar.bz2

3. Installation Environment Establishment

GCC has a self-contained script that automatically helps you download the dependent libraries that you need, which is recommended, otherwise you may have a version incompatibility problem with your downloaded library.

CD gcc-4.9.1
./contrib/download_prerequisites 

4. Create a compiled file directory

CD..
mkdir Gcc-build

5. Enter gcc-build and generate makefile files

.. /gcc-4.9.1/configure--enable-checking=release--enable-languages=c,c++  --disable-multilib

6. Modifying environment variables

Export Ld_library_path= $LD _library_path:/usr/local/lib

7. Compiling the installation

Make-j4 make
Install

After the compilation is successful, view the GCC version as 4.9.1 with Gcc-v.


Reference Document: http://plutopalace.blog.com/2014/03/28/centos-compile-install-gcc/

Http://www.netroby.com/view.php?id=3621#.U_Wcsx9d48o

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.