Install rJava package on AWS EC2 instance

2019-08-18 07:30发布

I am using R on AWS EC2 instance. I am trying to send a mail using the "mailR" package.

I was told that to install the package I should previously install the package "rJava" as "mailR" depends on it.

When trying to install "rJava" I get this error:

gcc: error: libgomp.spec: No such file or directory

After a quick search, I saw a post on this link explaining this:

"You have to make sure your GCC has OpenMP support enabled. Make sure you select OpenMP from the optional packages when installing."

I really have no idea how to do this. Should it be something to add in the parameters of install.packages("rJava")?

Assistance much appreciated !

M.

1条回答
SAY GOODBYE
2楼-- · 2019-08-18 07:48

Found the solution here

I did install gcc but apparently we should not install the latest version, so as suggested in the linked post, I downloaded version 4 and it worked.

You do that by typing in Putty:

sudo yum install gcc-4.8.5

Thanks !

查看更多
登录 后发表回答