Re: [R] How to create an R RPM from source

From: Martyn Plummer <>
Date: Mon, 21 May 2007 18:23:50 +0200

On Mon, 2007-05-21 at 07:46 -0700, Waichler, Scott R wrote:
> I use some computers that run older versions of Redhat Linux such as
> EL3. RPMs for the current version of R are no longer provided via CRAN
> for these older operating system versions. How can I compile my own RPM
> for the current version of R, which I could then use to install R
> quickly and easily on multiple machines? Perhaps the answer to this
> would be a useful addition to the manual R Installation and
> Administration. Obviously, I am not a system administrator and I don't
> deal with compiling from source code or using SRPMs very much. If
> anyone can explain the process step-by-step or refer me to instructions
> for the non-expert I would appreciate it.
> Thank you,
> Scott Waichler
> Pacific Northwest National Laboratory
> scott.waichler _at_

Hi Scott,

You need some sysadmin experience to do this.

You can build a new binary RPM from the source RPM, which is also available from CRAN, by typing

rpmbuild --rebuild /path/to/source.rpm

If you do this as root, then the result will be in /usr/src/redhat/RPMS/i386, or
depending on your platform.

You will get an error if you have not installed all the RPM packages required to build R correctly. Install them. The best way to do this is to use "yum", since it handles dependencies between packages.

It is much more secure to build RPMs as a normal user. You just need to create a file .rpmmacros in your home directory, with a single entry, like this:

%_topdir /home/martyn/mybuild

Then create the same directory structure under the directory "mybuild" as you find under /usr/src/redhat.

I hope this helps.


This message and its attachments are strictly confidential. ...{{dropped}} mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Mon 21 May 2007 - 17:04:10 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 21 May 2007 - 17:31:14 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.