-1

What's the best way in RHEL to install a newer version of a package than what's in the repositories?

In Ubuntu I can just add the repo for a newer version of Ubuntu, install the package with apt, and then disable the newer repo, but with RHEL and having to register the system with RHN, I don't see a way to do this. Is there some other way that would be more appropriate?

In particular, I'm trying to get a newer version of gcc-gfortran installed.

Thanks for any input!

4
  • 2
    Actually the technique you describe for Ubuntu is dangerous and very often results in broken systems. Packages built for a newer distribution are not guaranteed to work on an older distribution, very often do not work reliably or at all, and often break the system in unforeseen ways. Mar 28, 2015 at 20:03
  • As for gfortran, just how new does it need to be? RHEL 7 already has version 4.8.2, which should be fine for virtually anything not involving development of the compiler itself... Mar 28, 2015 at 20:05
  • Yeah, I'm always nervous using that approach, but I've had to do it on a couple of occasions and it's yet to cause me any issues.
    – KevinC
    Mar 29, 2015 at 11:27
  • As for version, 4.8.2 would be new enough, but my system is running RHEL 6, so it's only at 4.4.7. Thanks.
    – KevinC
    Mar 29, 2015 at 11:28

1 Answer 1

2

You have two options for getting a newer version of gcc than the one shipped with RHEL 6, your current Linux distribution.

  1. Upgrade to RHEL 7, which shipped with gcc 4.8.2.
  2. Use the Red Hat Developer Toolset, a software collection which supplies gcc 4.9.1 and updated versions of related tools, on either RHEL 6 or RHEL 7. This software collection is available with most RHEL subscriptions, but is in a separate subscription channel from Red Hat Software Collections.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .