The official way to have gcc 4.8.2 on RHEL 6 is via installing Red Hat Developer Toolset (yum install devtoolset-2), and in order to have it you need to have one of the below subscriptions:
- Red Hat Enterprise Linux Developer Support, Professional
- Red Hat Enterprise Linux Developer Support, Enterprise
- Red Hat Enterprise Linux Developer Suite
- Red Hat Enterprise Linux Developer Workstation, Professional
- Red Hat Enterprise Linux Developer Workstation, Enterprise
- 30 day Self-Supported Red Hat Enterprise Linux Developer Workstation Evaluation
- 60 day Supported Red Hat Enterprise Linux Developer Workstation Evaluation
- 90 day Supported Red Hat Enterprise Linux Developer Workstation Evaluation
- 1-year Unsupported Partner Evaluation Red Hat Enterprise Linux
- 1-year Unsupported Red Hat Advanced Partner Subscription
You can check whether you have any of these subscriptions by running:
subscription-manager list --available
and
subscription-manager list --consumed.
If you don't have any of these subscriptions, you won't succeed in "yum install devtoolset-2". However, luckily cern provide a "back door" for their SLC6 which can also be used in RHEL 6. Run below three lines via root, and you should be able to have it:
wget -O /etc/yum.repos.d/slc6-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo
wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-cern http://ftp.scientificlinux.org/linux/scientific/5x/x86_64/RPM-GPG-KEYs/RPM-GPG-KEY-cern
yum install devtoolset-2
Once it's done completely, you should have the new development package in /opt/rh/devtoolset-2/root/.
For some reason the mpc/mpfr/gmp packages aren't being downloaded. Just look in your gcc source directory, it should have created symlinks to those packages:
gcc/4.9.1/install$ ls -ad gmp mpc mpfr
gmp mpc mpfr
If those don't show up then simply download them from the gcc site: ftp://gcc.gnu.org/pub/gcc/infrastructure/
Then untar and symlink/rename them so you have the directories like above. Then when you ./configure and make, gcc's makefile will automatically build them for you.
Yum will install rpm from it's repository.
So I don't understand why you want to avoid yum, it will solve dependencies and install them as well.
However, here is official RPM repository mirror (one of many): http://centos.arminco.com/5/os/i386/CentOS/
Here is list of all mirrors : http://www.centos.org/modules/tinycontent/index.php?id=30
You will need at least 3 RPMs:
- gcc-4.4.6-3.el6.i686.rpm
- gcc-c++-4.4.6-3.el6.i686.rpm
- libgcc-4.4.6-3.el6.i686.rpm
For compilation of C/C++ you will also need libstdc++, glibc, etc
When you run
yum install gcc
Everything is done
As you did not specified architecture I assume i386, but URL is very similar for x86_64:
http://centos.arminco.com/6/os/x86_64/Packages/
If you want to install it as a local user (or as a superuser)
GNU GSRC provides an easy way to do so
Link: http://www.gnu.org/software/gsrc/
After installation via bzr, simply do these:
./bootstrap
./configure --prefix=~/local
make -C gnu/gcc
(or make -C gnu/gcc MAKE_ARGS_PARALLEL="-jN" to speed up for a N-core system)
make -C gnu/gcc install