[R] Installation on 64bit redhat linux question

Marc Schwartz marc_schwartz at me.com
Thu May 27 19:36:45 CEST 2010

On May 27, 2010, at 11:51 AM, Paul Geeleher wrote:

> Hi all,
> I'm trying to compile R 2.11.0 on a redhat machine, but I'm getting
> the following error when I run ./configure:
> checking whether gfortran appends underscores to external names... yes
> checking whether gfortran appends extra underscores to external names... no
> checking whether mixed C/Fortran code can be run... configure:
> WARNING: cannot run mixed C/Fortran code
> configure: error: Maybe check LDFLAGS for paths to Fortran libraries?
> I don't really know what "LDFLAGS" is, but I've searched online and I
> think this is something to do with not being able to find "libg2c.so".
> It seems to be located here on my machine
> "/usr/lib/gcc/x86_64-redhat-linux/3.4.6/".
> So I'm wondering if this is what is wrong and how I can make the
> configure script "see" the directory with this file, I'm a Linux
> newbie by the way so go easy!
> Thanks,
> Paul.


Might I suggest, that in lieu of compiling R from source, that you use the pre-built RPMs that are provided by the EPEL:


You don't indicate if you are running RHEL4 or RHEL5, but 64 bit RPMs for R 2.11.0 are available for both from the EPEL.  Follow the instructions for using the EPEL repos here:


Then, all you need to do, as root, is to use:

  yum install R-core R-devel

I believe that on RHEL4, yum may not be available, so you may need to use:


instead of yum.

The above error messages that you are getting would suggest that you are probably lacking some development tools and/or libraries required to compile applications from source, or that perhaps something is broken in your system configuration.  Using the pre-built RPMs would be the easier path to take, unless you have a specific requirement for compiling R from source code.

Using the EPEL will at least help you to get R itself installed. It is still possible however, that you may yet need to resolve the problem that you are having, if you at some point, will need to install CRAN packages. For Linux, these will be from source (save the few that are also available via the EPEL). If the packages contain C and/or FORTRAN code, as opposed to just R code, you will need to resolve the issue you are having.  I am not sure about the RHEL RPM group packaging, but there is typically a group with a name along the lines of "Development" or similar. You may want to install or re-install the relevant RPM groups related to programming and development tasks.

Specific information on other suggested/required components are listed in the R Installation and Administration Manual:


If you have RHEL, you will also likely have a support contract with RH, thus you are entitled to direct tech support from them and you may need to avail yourself of that service to get the basic configuration of your system correct. Alternatively, if you have a local Linux SysAdmin that you can access, that would be another option.


Marc Schwartz

More information about the R-help mailing list