0

RHEL 7 comes with built-in gcc of version 4.8. If I do

yum remove gcc

then it removes gcc 4.8. How can I remove gcc 7.3 from the system completely? I have tried to find the solution for the above problem but most of the solution is for Ubuntu. Can someone help to figure out a solution for CentOS/RHEL? Thanks.

Note:

which gcc

/usr/local/bin/gcc

gcc -v

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ./configure --disable-multilib --enable-languages=c,c++
Thread model: posix
gcc version 7.3.0 (GCC)
Kamalikap
  • 23
  • 4

1 Answers1

0

Try to give version number in package name to yum:

yum remove gcc-7.3.0
pifor
  • 7,419
  • 2
  • 8
  • 16
  • A manually installed gcc in /usr/local/ : Delete all files related to the alien gcc. ... I.e. you can have one `gcc` only in the PATH. ... Note : Extra compilers must be build so none of their files can disturb the system gcc files. Like these https://stackoverflow.com/questions/47175706/how-to-install-gcc-4-9-2-on-rhel-7-4/47189915#47189915 – Knud Larsen May 27 '20 at 10:33