Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I need to install gcc version 4.8.4 on my "Red Hat Enterprise Linux ES release 4 (Nahant Update 8)". I have uninstalled existing gcc version 3.4.6 because our client is using gcc4.8.4. I am using 3rd party libraries and Apis which are also compiled with gcc4.8.4.
So, I need to install gcc version 4.8.4.
I can not use yum repository due to some dependencies.
So, I tried to install by downloading a tar file but could not success as showing below mentioned error.
configure: error: in `/home/parmod/gcc':
configure: error: no acceptable C compiler found in $PATH
So, I searched more on internet and most of the people are suggesting to install using rpm package, but I could not find any gcc4.8.4 version package for redhat 4.
Please give me path of rpm package for gcc version 4.8.4 if possible.
What you needed to do is KEEP your installed gcc compiler (you will have to re-install it now) to compile the prerequisits for the new GCC, then compile the version 4 gcc from sources. To be very correct, you will then have to start with the clean sources and recompile gcc4 using gcc4.
The interesting question to me is: why are you stuck on an unsupported version of RHEL? Version 7 is the current release, I would expect anyone on 4 to have completed an upgrade project to RHEL 6 or 7 not later than 6 months ago.
Get to a more recent OS, and the more recent GCC comes along for the ride quite naturally, and all of those prerequistis take care of themselves. (or actually, are taken care of by yum/rpm and the current RHN for RHEL6/7)
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
@pnehra : Welcome to LQ.
Required : # yum install gcc-c++
... Which will reinstall the default gcc / g++.
There is no compiler available for ES (EL) 4.8 that can compile gcc-4.8.x.
All other prerequisites for gcc-4.8.x : None are available as EL4 packages.
! And : I guess that the ES 4.x glibc is too old for gcc-4.8.x .
Conclusion : Give it up. Sorry.
Now, I have installed a new gcc compiler 4.8.4 using below mentioned commands.
Quote:
tar -xzvf gcc-4.8.4.tar.gz
cd gcc-4.8.4
./contrib/download_prerequisites
cd ..
mkdir objdir
cd objdir
$PWD/../gcc-4.8.4/configure --prefix=$HOME/gcc-4.8.4 --enable-languages=c,c++
make
make install
Now, Please help me that How to set gcc 4.8.4 as default gcc compiler? The extracted gcc folder path is "/home/parmod/gcc-4.8.4".
The "objdir" path is "/home/parmod/objdir"
If above shown result is OK then May you update (few things) your script as per my environment for sample? As I am not able to understand that where is gcc4.8.4 is installed. Please help me.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.