Can I install `caret` on CentOS?

I am running the latest version of RServer on a CentOS EC2 instance.

I'd like to install caret, but I am getting this error message.

install.packages("caret", dependencies=TRUE, repos='http://cran.rstudio.com/')

Installing package into
‘/home/username/R/x86_64-redhat-linux-gnu-library/3.4’ (as ‘lib’ is
unspecified) Warning in install.packages : package ‘caret’ is not
available (for R version 3.4.1)

I saw that the CRAN page has OS and Windows binaries, but not Linux.

I looked into installing a Microsoft Server EC2 machine instead, but it looks like RServer is not supported. Can I install caret on Linux?

Yes, you can, your problem is the R version you are using, try updating R to a newer version (the latest stable version is 3.5.3)
If there are no R binaries available for CentOS you can compile it from source.

1 Like

I installed R Server and Shiny with the newest versions available on the website.

Here's my code

          #install RStudio-Server 1.0.153 (2017-07-20)
          wget https://download2.rstudio.org/server/centos6/x86_64/rstudio-server-rhel-1.2.1335-x86_64.rpm
          yum install -y --nogpgcheck rstudio-server-rhel-1.2.1335-x86_64.rpm
          rm rstudio-server-rhel-1.2.1335-x86_64.rpm
          #install shiny and shiny-server (2017-08-25)
          R -e "install.packages('shiny', repos='http://cran.rstudio.com/')"
          wget https://download3.rstudio.org/centos6.3/x86_64/shiny-server-1.5.9.923-x86_64.rpm
          yum install -y --nogpgcheck shiny-server-1.5.9.923-x86_64.rpm

RStudio is not the same as R they are two different things, have you also updated R?

https://cran.r-project.org

sudo yum install epel-release
sudo yum install R
1 Like

I ran both of those commands and got back this output:

[ec2]$ sudo yum install epel-release
Loaded plugins: priorities, update-motd, upgrade-helper
Package epel-release-6-8.9.amzn1.noarch already installed and latest version
Nothing to do
[ec2]$ sudo yum install R
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main                                                | 2.1 kB     00:00     
amzn-updates                                             | 2.5 kB     00:00     
Package R-3.4.1-1.52.amzn1.x86_64 already installed and latest version
Nothing to do

This should be working for CentOS 7 although I can't be sure because I don't use CentOS myself, what CentoS version are you using?

It looks like I was wrong about CentOS. I know it's a type of redhat.

[ec2]$ cat os-release
NAME="Amazon Linux AMI"
VERSION="2018.03"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2018.03"
PRETTY_NAME="Amazon Linux AMI 2018.03"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2018.03:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"

It's running on this image.

I think there is no newer R binary available for rhel based OS' you could compile it from source but unfortunately I don't how to do it with this linux version, hopefully someone else could help you.

In case anyone else visits this thread, this is the guide and this is the source for the tarball.

Please see the post following this since it has the information.

2 posts were split to a new topic: Installing package: auc_.cpp:2:10: fatal error: omp.h: No such file or directory

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.