Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Linux Server install R package

enter image description hereI try to install the package "data.table" (and "aws.s3)" via Rstudio Server on an Amazon Linux instance following this guide: http://stanke.co/category/r/

Unfortunately, I get the following error message. I really don't know what else to do.

Can anybody help? I installed devtools and I am able to install other packages such as xml2, devtools and deplyr.

like image 314
Sylvi0202 Avatar asked Jan 17 '18 17:01

Sylvi0202


People also ask

Can you run R in AWS?

Use cases for R on AWS As data analysis trends towards larger datasets, R users—who may be used to running analyses locally on a laptop—often will hit barriers as the result of computing, memory, and cost constraints. By moving workflows to AWS, R users can overcome these barriers.

What package manager does Amazon Linux use?

Amazon Linux instances manage their software using the yum package manager. The yum package manager can install, remove, and update software, as well as manage all of the dependencies for each package.

Which command is used to install software packages in EC2?

Use the yum install package command, replacing package with the name of the software to install.


1 Answers

I had the same issue on AWS and already fixed. You need first install gcc64 and openmp shared support library.

sudo yum install gcc64
sudo yum install libgomp

Then under your user home create an .R folder with a Makevars file in it, with the following content (it will tell to R which compiler to use):

CC = /usr/bin/gcc64
CXX = /usr/bin/g++
SHLIB_OPENMP_CFLAGS = -fopenmp

I hope it's working for you as well ...

like image 56
Botond Egri Avatar answered Oct 01 '22 20:10

Botond Egri