Install R 3+ on Redhat 6.3

2019-06-25 06:54发布

问题:

I want to install R on my Red hat cluster which has the version below:

$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.3 (Santiago)

When I went to R's homepage and this is what in their repository:

I am wondering there is only redhat version 4 and 5 there and I don't know which version will best fit my operating system.

Texinfo Problem Goes Here

Since I have asked more than 6 questions today. Stackoverflow doesn't like me to ask more questions. So I will put the following questions into this question, sorry about that.

Hi, I was trying to use Expect to automatically log into a remote server and install R. When I install R, they came up with all kinds of prompts asking 'The package will take xx MB Is that OK with you'?

The command to install:

su -c 'yum install R R-core R-core-devel R-devel'

You need to type in Yes for a few times to finish the installation.

My question is:

  1. Is there a flag for yum install that you can tell the machine to install everything I want you to install. Don't ask me. So I can install those four packages without any prompt.

  2. If that is hard to install in the 'quiet mode', how to write a while loop in Expect so it will send the Y automatically:

    Pseudo Code Not Working!
    send -- "sudo su -c yum install ...."
    while ("Expect '*Is it OK [Y/N]*'"){
    send 'Y\r'
    # if (expect 'user$')
    {break}
    }
    

Thanks a lot in advance.

回答1:

This is likely due to there being R RPMs in the Extra Packages for Enterprise Linux (EPEL) repos for RHEL6. You can find out more about EPEL on the Fedora website.

You need to configure yum to use EPEL. The easiest way to do this is to install the epel-release package for your platform, eg

su -c 'rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm'

or

su -c 'rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm'

for example. The you can use yum to install R, e.g. you will probably want

su -c 'yum install R R-core R-core-devel R-devel'

so that you pull in the packages needed to build other add-on packages as most CRAN package are not in EPEL.

At the moment, the latest version of R in EPEL is 3.0.1, so one patch release point behind the latest version 3.0.2.



标签: r expect redhat