1

I want to use yum to install R on Centos 6. But I always got "No R package available".

Here below is my step:

First, I want to install epel.

[root@host ~]# yum install epel-release
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: centos.ca-west.mirror.fullhost.io 
* elrepo-kernel: repos.lax-noc.com 
* extras: centos.ca-west.mirror.fullhost.io 
* updates: centos.ca-west.mirror.fullhost.io
Package epel-release-6-8.noarch already installed and latest version
Nothing to do

Then I want to install R:

# yum install R
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: centos.ca-west.mirror.fullhost.io
 * elrepo-kernel: repos.lax-noc.com
 * extras: centos.ca-west.mirror.fullhost.io
 * updates: centos.ca-west.mirror.fullhost.io
No package R available
Error: Nothing to do.

I also try to use:

yum clean all
yum update

To clean the envirement. But get the same problem.

here below is the info of the repolist. Hope it is helpful.

# sudo yum repolist all
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.ca-west.mirror.fullhost.io
 * elrepo-kernel: repos.lax-noc.com
 * extras: centos.ca-west.mirror.fullhost.io
 * updates: centos.ca-west.mirror.fullhost.io

repo id                repo name                                status
C6.0-base              CentOS-6.0 - Base                        disabled
C6.0-centosplus        CentOS-6.0 - CentOSPlus                  disabled
C6.0-contrib           CentOS-6.0 - Contrib                     disabled
C6.0-extras            CentOS-6.0 - Extras                      disabled
C6.0-updates           CentOS-6.0 - Updates                     disabled
C6.1-base              CentOS-6.1 - Base                        disabled
C6.1-centosplus        CentOS-6.1 - CentOSPlus                  disabled
C6.1-contrib           CentOS-6.1 - Contrib                     disabled
C6.1-extras            CentOS-6.1 - Extras                      disabled
C6.1-updates           CentOS-6.1 - Updates                     disabled
C6.2-base              CentOS-6.2 - Base                        disabled
C6.2-centosplus        CentOS-6.2 - CentOSPlus                  disabled
C6.2-contrib           CentOS-6.2 - Contrib                     disabled
C6.2-extras            CentOS-6.2 - Extras                      disabled\
C6.2-updates           CentOS-6.2 - Updates                     disabled
C6.3-base              CentOS-6.3 - Base                        disabled\
C6.3-centosplus        CentOS-6.3 - CentOSPlus                  disabled
C6.3-contrib           CentOS-6.3 - Contrib                     disabled
C6.3-extras            CentOS-6.3 - Extras                      disabled
C6.3-updates           CentOS-6.3 - Updates                     disabled
C6.4-base              CentOS-6.4 - Base                        disabled
C6.4-centosplus        CentOS-6.4 - CentOSPlus                  disabled
C6.4-contrib           CentOS-6.4 - Contrib                     disabled
C6.4-extras            CentOS-6.4 - Extras                      disabled
C6.4-updates           CentOS-6.4 - Updates                     disabled
C6.5-base              CentOS-6.5 - Base                        disabled
C6.5-centosplus        CentOS-6.5 - CentOSPlus                  disabled
C6.5-contrib           CentOS-6.5 - Contrib                     disabled
C6.5-extras            CentOS-6.5 - Extras                      disabled
C6.5-updates           CentOS-6.5 - Updates                     disabled
C6.6-base              CentOS-6.6 - Base                        disabled
C6.6-centosplus        CentOS-6.6 - CentOSPlus                  disabled
C6.6-contrib           CentOS-6.6 - Contrib                     disabled
C6.6-extras            CentOS-6.6 - Extras                      disabled
C6.6-updates           CentOS-6.6 - Updates                     disabled
C6.7-base              CentOS-6.7 - Base                        disabled
C6.7-centosplus        CentOS-6.7 - CentOSPlus                  disabled
C6.7-contrib           CentOS-6.7 - Contrib                     disabled
C6.7-extras            CentOS-6.7 - Extras                      disabled
C6.7-updates           CentOS-6.7 - Updates                     disabled
C6.8-base              CentOS-6.8 - Base                        disabled
C6.8-centosplus        CentOS-6.8 - CentOSPlus                  disabled
C6.8-contrib           CentOS-6.8 - Contrib                     disabled
C6.8-extras            CentOS-6.8 - Extras                      disabled
C6.8-updates           CentOS-6.8 - Updates                     disabled
C6.9-base              CentOS-6.9 - Base                        disabled
C6.9-centosplus        CentOS-6.9 - CentOSPlus                  disabled
C6.9-contrib           CentOS-6.9 - Contrib                     disabled
C6.9-extras            CentOS-6.9 - Extras                      disabled
C6.9-updates           CentOS-6.9 - Updates                     disabled
base                   CentOS-6 - Base                          enabled: 6,712+1
base-debuginfo         CentOS-6 - Debuginfo                     disabled
c6-media               CentOS-6 - Media                         disabled
centosplus             CentOS-6 - Plus                          disabled
contrib                CentOS-6 - Contrib                       disabled
elrepo                 ELRepo.org Community Enterprise Linux Re disabled
elrepo-extras          ELRepo.org Community Enterprise Linux Ex disabled
elrepo-kernel          ELRepo.org Community Enterprise Linux Ke enabled:      13
elrepo-testing         ELRepo.org Community Enterprise Linux Te disabled
epel                   Extra Packages for Enterprise Linux 6 -  disabled
epel-debuginfo         Extra Packages for Enterprise Linux 6 -  disabled
epel-source            Extra Packages for Enterprise Linux 6 -  disabled
epel-testing           Extra Packages for Enterprise Linux 6 -  disabled
epel-testing-debuginfo Extra Packages for Enterprise Linux 6 -  disabled
epel-testing-source    Extra Packages for Enterprise Linux 6 -  disabled
extras                 CentOS-6 - Extras                        enabled:      46
fasttrack              CentOS-6 - fasttrack                     disabled
updates                CentOS-6 - Updates                       enabled:   455+8

repolist: 7,226
Exit code: 0

and I can use "yum install gcc", and it works well.

kanpu
  • 251
  • 2
  • 10
  • [R packages are available from the EPEL repositories](https://linuxize.com/post/how-to-install-r-on-centos-7/). Have you enabled the EPEL repos on your CentOS machine? `sudo yum install epel-release`? Then try again with `sudo yum install R`. – Maurits Evers May 24 '19 at 07:57
  • Thank you. I have tried, but still failed. – kanpu May 24 '19 at 08:25
  • *"I have tried, but still failed."* What failed? Enabling the EPEL repos? Have you verified that they were enabled with `sudo yum repolist`? Please be specific and add all of this critical information in the main post (not in the comments). There are various others threads here on SO dealing with installing R on CentOS 6(-like systems). Have you looked at those? E.g. [here](https://stackoverflow.com/questions/18086262/problems-installing-r-on-linux-centos-6-3), [here](https://stackoverflow.com/questions/18747640/installing-r-on-rhel-6) – Maurits Evers May 24 '19 at 08:32
  • [continued] Also [this post](http://jianlu.github.io/2016/02/10/Install-R-and-R-Packages-on-RHEL6/). Without details (re: what you've tried, what worked, what didn't) I'm inclined to close this question as a dupe of one of the afore-mentioned posts here on SO. – Maurits Evers May 24 '19 at 08:33
  • @MauritsEvers Sorry. I have not make it clear. I have changed the discription of my question. I use "yum install epel-relase", and it says "package epel-release-6-8.noarch already installed and latest version" – kanpu May 24 '19 at 08:38
  • Thanks for updating the question. Can you confirm that EPEL shows up in `sudo yum repolist all`? (Perhaps add the output of that command to your post.) – Maurits Evers May 24 '19 at 09:44
  • @MauritsEvers Thank you for your advice. I have added the result of sudo yum repolist all and I notices that. epel's status is disabled. Is that the point? – kanpu May 24 '19 at 16:36
  • 1
    Yes I believe that is the issue. Try enabling with `yum-config-manager --enable epel`; after that, `sudo yum install R` should find R. – Maurits Evers May 24 '19 at 22:17
  • 1
    @MauritsEvers Thank you. It is solved as you suggest. – kanpu May 25 '19 at 17:07

1 Answers1

0

Try running the following:

yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

Then run the following:

sudo yum install R

Hope it helps

Abhishek R
  • 4,087
  • 1
  • 17
  • 21