If the GCC version of ubuntu 11.10 is too high, install GCC 4.4.

Source: Internet
Author: User

GCC -- version

 

 

The GCC version of ubuntu 11.10 is 4.6.1. The version is too high. If you fail to compile Android, you need to change the GCC version to 4.4.3.

 

Through gcc
-V command can be found in the GCC Library/usr/lib/GCC/i686-linux-gnu directory, the directory has the current system to support all types of GCC library. Install gcc
4.4 Before this directory is not 4.4 directory, after the installation of GCC 4.4, the directory will be more than 4.4 This directory, and the 4.4 directory contains various types of response library files.

The best way to install GCC 4.4 in Ubuntu 32bit system is to only use the following two number orders, no other number orders are required, or the compilation may fail.

Sudo apt-Get install gcc-4.4

Sudo apt-Get install g ++-4.4

After installation, go to the/usr/bin directory.

 

 

$ LS-l GCC *

 

Lrwxrwxrwx 1 Root 7 2011-10-29 gcc-> gcc-4.6

 

-Rwxr-XR-x 1 Root 224544 gcc-4.4

 

-Rwxr-XR-x 1 Root 302104 gcc-4.6

 

The invention of GCC link to the gcc-4.6, need to link it to the gcc-4.4:

 

Sudo mv gcc. Bak

Sudo ln-s gcc-4.4 gcc

Likewise

Ls-l g ++ *

 

Lrwxrwxrwx 1 Root 7g ++-> G ++-4.6

 

-Rwxr-XR-x 1 Root 228640g ++-4.4

 

-Rwxr-XR-x 1 Root 306200g ++-4.6

 

You need to change the G ++ link to G ++-4.4:

 

/Usr/bin ¥ sudo MV g ++. Bak

 

/Usr/bin ¥ sudo ln-s g ++-4.4g ++

 

 

Check the GCC and G ++ versions:

 

Gcc-V

 

G ++-V

 

GCC version 4.4.6 is displayed, indicating that GCC 4.4 is successfully installed.



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.