In ubuntu12.04, the gcc4.6/g++4.6 version is reduced to gcc4.4/g++4.4.

Source: Internet
Author: User

reduce Ubuntu Central GCC and g++ version of

The gcc/g++ in Ubuntu 12.04 are all 4.6, dropping it to 4.4.

The procedure is as follows:

One, reduce the GCC version

1. $sudo Apt-get Install gcc-4.4

2, $sudo update-alternatives--INSTALL/USR/BIN/GCC gcc/usr/bin/gcc-4.4 40 (where "40" is the priority, the higher the value the higher the priority)

3, $sudo update-alternatives--INSTALL/USR/BIN/GCC gcc/usr/bin/gcc-4.6 60 (This machine comes with a set of 60 higher priority)

4, select the system default GCC

$sudo update-alternatives--config gcc

Selection

Path

priority   

Status

* 0

/usr/bin/gcc-4.6 

Auto mode

1

/usr/bin/gcc-4.4 

Manual mode

2

/usr/bin/gcc-4.6

Manual mode

The default system with the highest priority, here we choose 1.

Second, reduce the g++ version

1. $sudo Apt-get Install g++-4.4

2, $sudo update-alternatives--install/usr/bin/g++ g++/usr/bin/g++-4.4 40 (here "40" is the priority, the higher the value the higher the priority)

3, $sudo update-alternatives--install/usr/bin/g++ g++/usr/bin/g++-4.6 60 (This machine comes with a set of 60 higher priority)

4, select the system default g++

$sudo update-alternatives--config g++

Selection

Path

priority   

Status

* 0

/usr/bin/g++-4.6 

Auto mode

1

/usr/bin/g++-4.4 

Manual mode

2

/usr/bin/g++-4.6

Manual mode

The default system with the highest priority, here we choose 1.

Add: Switch with update-alternatives--config command if you want to change to a higher version at any time

In ubuntu12.04, the gcc4.6/g++4.6 version is reduced to gcc4.4/g++4.4.

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.