简体   繁体   English

在AWS EC2实例上安装rJava软件包

[英]Install rJava package on AWS EC2 instance

I am using R on AWS EC2 instance. 我在AWS EC2实例上使用R。 I am trying to send a mail using the "mailR" package. 我正在尝试使用“ mailR”包发送邮件。

I was told that to install the package I should previously install the package "rJava" as "mailR" depends on it. 有人告诉我要安装该软件包,我之前应该先将其安装为“ rJava”,因为“ mailR”取决于该软件包。

When trying to install "rJava" I get this error: 尝试安装“ rJava”时,出现此错误:

gcc: error: libgomp.spec: No such file or directory gcc:错误:libgomp.spec:没有这样的文件或目录

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." “您必须确保GCC启用了OpenMP支持。请确保在安装时从可选软件包中选择OpenMP。”

I really have no idea how to do this. 我真的不知道该怎么做。 Should it be something to add in the parameters of install.packages("rJava")? 是否应该在install.packages(“ rJava”)参数中添加一些内容?

Assistance much appreciated ! 协助非常感谢!

M. M.

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. 我确实安装了gcc,但显然我们不应该安装最新版本,因此如链接文章中所建议,我下载了版本4,并且可以正常工作。

You do that by typing in Putty: 您可以通过输入Putty来做到这一点:

sudo yum install gcc-4.8.5

Thanks ! 谢谢 !

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM