I have tried all the solutions of similar questions and none works.
I have installed gcc in /usr/local/bin and this my PATH variable
echo $PATH/usr/local/gcc-12.1.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
But when i run gcc --version command, my linux can't find it, why?
gcc --versiongcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0Copyright (C) 2019 Free Software Foundation, Inc.
It still points to the older 9.4.0 version.Could someone help me use the new version of the gcc compiler.
Thanks!