Install and change the gcc or g ++ version in Linux

Source: Internet
Author: User
Take gcc-4.3 and g ++-4.3 as an example: after sudoapt-getinstallgcc-4.3g ++-4.3 enters/usr/bin: cd/usr/bin first delete gcc associated with gcc4.4: sudormgccsudormg ++ re-build a soft-connection sudoln-sgcc-4.3gccsudoln-sg +...

Take gcc-4.3 and g ++-4.3 as an example:
Sudo apt-get install gcc-4.3 g ++-4.3

Then enter/usr/bin:
Cd/usr/bin

Delete the gcc associated with gcc4.4 first:
Sudo rm gcc
Sudo rm g ++

Create another soft connection
Sudo ln-s gcc-4.3 gcc
Sudo ln-s g ++-4.3g ++

Then, you can run the following command to check whether 4.3 is associated:
Ln gcc *
If the association is gcc4.3, you can make it with confidence.



Author hpwzd

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.