4

I upgrade my system from 16.04 to 18.04 but the gcc and g++ version change to 7 such that some of my program cannot compile, so how can I change gcc and g++ version to 4.8?

Thanks

1 Answers1

2

To install gcc-4.8 open the terminal and type:

sudo apt remove gcc gcc-8 g++ g++-8 
sudo apt install gcc-4.8 g++-4.8   

You can also have multiple versions of gcc/g++ installed alongside each other and select which version to use each time: How to use multiple instances of gcc?.

karel
  • 114,770