How do I downgrade gcc on Ubuntu?

Discussion in 'Installation/Configuration' started by indie1982, Sep 10, 2008.

  1. indie1982

    indie1982 New Member

    I installed Ubuntu Hardy Heron back in May and then installed ISPConfig. Everything went fine and the server's been fine.

    Since then gcc has been updated to 4.2 and the new version of ISPConfig doesn't like 4.2. How do I downgrade my gcc version to 3.4?

    I tried apt-get remove gcc and apt-get install gcc-3.4 but then the ISPConfig installer says it can't find gcc.

    Do I have to update a link somewhere so /usr/bin/gcc points to /usr/bin/gcc-3.4?

    Any help would be greatly appreciated!
  2. jon

    jon Member HowtoForge Supporter

    you may need to remove the existing gcc link and recreate it, pointing to the new(old in your case) gcc
  3. indie1982

    indie1982 New Member

    All sorted, I think!

    apt-get remove gcc g++

    apt-get install gcc-3.4 g++-3.4

    ln -s /usr/bin/gcc-3.4 /usr/bin/gcc
    ln -s /usr/bin/g++-3.4 /usr/bin/g++

    It's compiling as I type and it's gone further than before! Fingers crossed!

Share This Page