Multiple GCC versions in LINUX

Source: Internet
Author: User
Multiple GCC versions of LINUX-general Linux technology-Linux programming and kernel information. For details, refer to the following section. I am currently using UBUNTU 8.04. Because I have been upgrading LINUX recently, my GCC is also getting higher now, which is 4.2.3. The following prompt appears when I compile the CROSSTOOL on hand:

Checking for a BSD-compatible install.../usr/bin/install-c
Checking whether ln-s works... yes
Checking for pwd.../bin/pwd
Checking for arm-linux-gcc... gcc
Checking version of gcc... 4.2.3, bad
Checking for gnumake... no
Checking for gmake... no
Checking for make... make
Checking version of make... 3.81, OK
Configure: error:
*** These critical programs are missing or too old: gcc
* ** Check the INSTALL file for required versions.

So I need to press my current GCC version to the previous status 3.4. First of all, you need to go to your usr/bin/to see if there is a gcc-3.4 such a file, if not, install it:

Apt-get install gcc-3.4

Then, you need to delete the gcc file under the usr/bin/directory or avoid exceptions. you can name it gcc. bak. Here you need to note that if you do not delete it, you will find that your use of ln-s/usr/bin/gcc-3.4/usr/bin/gcc always does not work. In fact, when you use gcc-v to view the current version, you always use usr/bin/gcc. The purpose of ln-s/usr/bin/gcc-3.4/usr/bin/gcc is to generate gcc version 3.4. In one sentence, you only need to execute:

Rm/usr/bin/gcc
Ln-s/usr/bin/gcc-3.4/usr/bin/gcc

Then gcc-v can see that the current version is 3.4. If you want to use the current 4.2.3, use the same method:

Rm/usr/bin/gcc
Ln-s/usr/bin/gcc-4.2.3/usr/bin/gcc

Then let's determine the gcc-v version. Good luck.
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.