0

I installed gcc 9 using

sudo add-apt-repository ppa:jonathonf/gcc-9.0
sudo apt-get install gcc-9

But running gcc -v (after restart) still gave the output of 7.4.0.
Additionally, I tried uninstalling gcc

sudo apt-get --purge remove gcc-7

and then installing gcc -9, but then running gcc -v says no file/directory found.

Tistayu
  • 113
  • 2
    This is essentially the same as Install gcc 7.1 on Xubuntu 16.04 and make it default - although you can make it default (either by manually symlinking, or by using update-alternatives) it's often simpler to just call gcc-9 explicitly when you need it. – steeldriver Feb 11 '20 at 17:14
  • 1
    The ppa doesn't use a gcc dependency package so you'll not have a /usr/bin/gcc link to gcc-9. gcc-9 -v would return info.. – doug Feb 11 '20 at 17:19
  • 1
    @Tistayu : The default system compiler gcc should not be removed. You can have as many gcc/g++ versions as you want, installed at the same time. .... sudo update-alternatives --config gcc can select version. – Knud Larsen Feb 11 '20 at 18:04

0 Answers0