[英]Installing R on Hortonworks Sandbox hadoop 2.3
I'm experiencing some troubles when I try to install R dependencies with the command : 尝试使用命令安装R依赖项时遇到一些麻烦:
install.packages(c(“Rcpp”,”RJSONIO”,”bitops”,”digest”,”functional”,”itertools”,”reshape2″,”string ”,”plyr”,”caTools”),repos=’http://cran.revolutionanalytics.com’)
packages are downloaded but then all I get are the messages 软件包已下载,但我得到的只是消息
/usr/lib64/R/bin/R: line 8: uname: command not found /usr/lib64/R/bin/R: line 143: exec: sh: not found
/ usr / lib64 / R / bin / R:第8行:uname:找不到命令/ usr / lib64 / R / bin / R:第143行:exec:sh:找不到
repeated as many times as the number of packages I am trying to install. 重复我尝试安装的软件包数量的次数。
I am using R version 3.2.2, rstudio-server 0.99.489 in Hortonworks Sandbox with hadoop 2.3 (Oracle Virtualbox). 我在带有Hadoop 2.3(Oracle Virtualbox)的Hortonworks Sandbox中使用R版本3.2.2,rstudio-server 0.99.489。
Do you have any suggestions? 你有什么建议吗?
Thanks for your help. 谢谢你的帮助。
I know this question was asked 7 months ago. 我知道这个问题是在7个月前提出的。 But I just had the same problem stefanod did and I Googled left and right without finding a solution.
但是我也遇到了stefanod遇到的同样问题,我左右搜索Google,但没有找到解决方案。 Then for absolutely no reasonable reason it just worked.
然后,出于绝对没有合理的原因,它只是起作用了。 Here is what I have tried and what eventually solves my problem:
这是我尝试过的方法,最终解决了我的问题:
So I use R 3.2.2
, rstudio-server 0.98.994
in Hortonworks Hadoop Sandbox HDP 2.4
in VMWare. 所以我在VMWare的Hortonworks Hadoop沙盒
HDP 2.4
中使用R 3.2.2
, rstudio-server 0.98.994
。 I logged in the virtual machine using the Shell Web Client Method . 我使用Shell Web Client Method登录了虚拟机。 The entire process was done with root privilege.
整个过程都具有root特权。 I followed this instruction: https://jsolderitsch.wordpress.com/hortonworks-sandbox-r-and-rstudio-install/ except that I used updated versions of
R
and RStudio Server
. 我遵循了以下说明: https : //jsolderitsch.wordpress.com/hortonworks-sandbox-r-and-rstudio-install/,除了我使用
R
和RStudio Server
更新版本。 Everything worked fine until I invoked R
in the shell and attempted 一切正常,直到我在外壳中调用
R
并尝试
install.packages('foo.bar', repos='http://cran.revolutionanalytics.com')
Then I had exactly the same error messages as in this Q. 然后,我得到了与该问题完全相同的错误消息。
I checked my $PATH
and used whereis COMMANDNAME
to check if I had the uname
command at the right place. 我检查了
$PATH
并使用whereis COMMANDNAME
检查在正确的位置是否有uname
命令。 Seems I do. 好像我知道
I then quit R
. 然后我退出
R
Inside CentOS
I used wget
to manually download the .tar.gz
files of the packages and their dependencies. 在
CentOS
内部,我使用wget
来手动下载软件包及其相关性的.tar.gz
文件。 I then tried to install those packages manually: 然后,我尝试手动安装这些软件包:
[root@sandbox ~]# sudo R CMD INSTALL foo.bar.tar.gz
* installing to library ‘/usr/lib64/R/library’
* installing *source* package ‘foo.bar’ ...
** package ‘foo.bar’ successfully unpacked and MD5 sums checked
** libs
sh: make: command not found
ERROR: compilation failed for package ‘foo.bar’
* removing ‘/usr/lib64/R/library/foo.bar’
sh: rm: command not found
At this time RStudio
was already installed. 目前已经安装了
RStudio
。 So I logged into RStudio
in my browser at port 8787 and tried install.packages
in RStudio
and every package installed fine. 因此,我在浏览器的端口8787上登录了
RStudio
,并尝试在RStudio
安装install.packages
,并安装了每个软件包。
I guess the take-home message is to install packages inside RStudio
instead of inside R
in the shell. 我想带回家的消息是要在
RStudio
内安装软件包,而不是在Shell中的R
内安装软件包。
BTW I also cannot log in RStudio as root; 顺便说一句,我也不能以root用户身份登录RStudio。 says invalid username and password.
说无效的用户名和密码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.