This is a very strange error I am running into trying to install a specific R library on AWS EC2 instance (Amazon Linux AMI). A link in the AWS forums here, posted by someone else, actually highlights my issue well.
The main / relevant part of the error message is:
data.table.h:6:12: fatal error: omp.h: No such file or directory
#include <omp.h>
I did some research (while I'm not sure), I think this is related to whether or not there is an OpenMP enabled compiler on the server. The data.table installation page on GitHub itself discusses this a bit here, but I'm not sure how to update or fix this on my EC2 instance.
Any help with this is appreciated.
EDIT - this is a new problem, as i was able to successfully install data.table on a previous, similar EC2 instance less than a month ago.
EDIT 2 - I got around this issue by taking a previous EC2 instance of mine with data.table already installed on it, and creating a custom AMI from it. By using this custom AMI when launching new instances, they already came with the data.table library installed. If I notice AWS resolve this issue on its own, I'll try to remember to come back and update this post!
~/.R/Makevars
– Northerner