Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to install gcc 4.9.2 on RHEL 7.4

I am trying to install gcc and g++ 4.9.2 on Linux. I'm pretty new with Linux and i saw some guides of how to install, but each time I encountered with another problem. I don't have any gcc right now on my machine. my Linux version is: Red Hat Enterprise Linux Server release 7.4 (Maipo) can someone help me and give me instructions from the beginning to the end how to do this properly? thank you very much.

like image 436
Hope Avatar asked Nov 08 '17 09:11

Hope


People also ask

What version of GCC is RHEL8?

RHEL8 : gcc 8. X or gcc 9. X in app stream. RHEL7 : gcc 4.8.


1 Answers

yum install centos-release-scl-rh
yum install devtoolset-3-gcc devtoolset-3-gcc-c++
update-alternatives --install /usr/bin/gcc-4.9 gcc-4.9 /opt/rh/devtoolset-3/root/usr/bin/gcc 10
update-alternatives --install /usr/bin/g++-4.9 g++-4.9 /opt/rh/devtoolset-3/root/usr/bin/g++ 10
like image 170
Lars Bilke Avatar answered Oct 10 '22 22:10

Lars Bilke