Monday, July 9, 2012

Downgrade gcc to 4.4.6 on ubuntu 11.10 64 bit

1. Check all versions of gcc you have installed.

     ls /usr/bin/gcc* -l
you should be able to see something like:      lrwxrwxrwx 1 root root      7 2011-08-14 15:17 /usr/bin/gcc -> gcc-4.6
        -rwxr-xr-x 1 root root 224544 2011-10-06 05:47 /usr/bin/gcc-4.4
        -rwxr-xr-x 1 root root 237072 2011-09-17 17:25 /usr/bin/gcc-4.5
        -rwxr-xr-x 1 root root 302104 2011-09-17 05:43 /usr/bin/gcc-4.6

2. Modify the soft link of /usr/bin/gcc.
        sudo rm /usr/bin/gcc
        sudo ln -s /usr/bin/gcc-4.4 /usr/bin/gcc

3. Check your gcc version now.
       gcc -v
    you should be able to see your gcc now is 4.4

4. Do the samething to g++.

5. Done.

No comments:

Post a Comment