0

Followed the following procedure to upgrade my gcc from 4.8 to 6.3 on my Ubuntu 14.04, (as described by Update GCC to the 6.3 version )

wget https://ftp.gnu.org/gnu/gcc/gcc-6.3.0/gcc-6.3.0.tar.bz2
tar xzvf gcc-6.3.0.tar.bz2
cd gcc-6.3.0
./contrib/download_prerequisites
cd ~
mkdir gcc-build && cd gcc-build
../gcc-6.3.0/configure -v --prefix=$HOME/gcc-6.3.0
make -j16
sudo make install -j16

But I was not able to see the upgraded version of gcc when given gcc -v

Can anyone suggest a solution for this ?

Thank you in advance.

Videonauth
  • 33,045
  • 16
  • 104
  • 120
  • 1
    You installed to `$HOME/gcc-6.3.0`. Is that directory in your `PATH`? – muru Oct 24 '17 at 10:48
  • yes, $HOME points to my Home directory and I extracted the tar file too in my home directory only. – Eswar Chandra Oct 24 '17 at 10:56
  • That's good, but not what I asked. – muru Oct 24 '17 at 11:03
  • IIRC it would be `$HOME/gcc-6.3.0/bin` specifically that you would need to add to your `PATH`. Also you shouldn't need `sudo` to install to `$HOME` - however since you apparently *may* use `sudo`, you could consider installing from the [toolchain-r PPA](https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test?field.series_filter=trusty) instead. – steeldriver Oct 24 '17 at 12:00

0 Answers0