[R] How to create an R RPM from source

Martyn Plummer plummer at iarc.fr
Mon May 21 18:23:50 CEST 2007


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_ pnl.gov

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
/usr/src/redhat/RPMS/x86_64
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.

Martyn


-----------------------------------------------------------------------
This message and its attachments are strictly confidential. ...{{dropped}}



More information about the R-help mailing list