【问题标题】:R & RStudio Installation on AWS EC2 Linux AMI - latest version of R在 AWS EC2 Linux AMI 上安装 R & RStudio - 最新版本的 R
【发布时间】:2017-06-28 07:55:58
【问题描述】:

亚马逊为启动微型实例和安装 R&RStudio 提供了清晰的安装指南。该指南可以在这里找到:https://aws.amazon.com/blogs/big-data/running-r-on-aws/

不幸的是,这会安装旧版本的 R. (3.2.2),它会为某些包(如 slam)提供问题,因为它们需要 R 版本 > 3.3.1

在更改用户数据的步骤指南中,他们提供了以下脚本,其中涵盖了 R&RStudio 的安装。如何更改脚本以安装最新版本的 R?

#!/bin/bash
#install R
yum install -y R
#install RStudio-Server
wget https://download2.rstudio.org/rstudio-server-rhel-0.99.465-x86_64.rpm
yum install -y --nogpgcheck rstudio-server-rhel-0.99.465-x86_64.rpm
#install shiny and shiny-server
R -e "install.packages('shiny', repos='http://cran.rstudio.com/')"
wget https://download3.rstudio.org/centos5.9/x86_64/shiny-server-1.4.0.718-rh5-x86_64.rpm
yum install -y --nogpgcheck shiny-server-1.4.0.718-rh5-x86_64.rpm
#add user(s)
useradd username
echo username:password | chpasswd

谢谢

【问题讨论】:

标签: r linux amazon-web-services amazon-ec2 rstudio


【解决方案1】:

试试这个:

# Install r-base
yum install r-base

# Install newest version of R from source
 wget https://cran.r-project.org/src/base/R-3/R-3.4.0.tar.gz
./configure --prefix=/home/$user/R/R-3.4.0 --with-x=yes --enable-R-shlib=yes --with-cairo=yes
make
# NEWS.pdf file is missing and will make installation crash.
touch doc/NEWS.pdf
make install

# Do not forget to update your PATH
export PATH=~/R/R-3.4.0/bin:$PATH
export RSTUDIO_WHICH_R=~/R/R-3.4.0/bin/R

我从 ubuntu R 安装方法中翻录了这个:http://jtremblay.github.io/software_installation/2017/06/21/Install-R-3.4.0-and-RStudio-on-Ubuntu-16.04

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-12-04
    • 2018-09-09
    • 2022-05-25
    • 1970-01-01
    • 2014-03-05
    • 2018-12-12
    • 2017-01-14
    • 1970-01-01
    相关资源
    最近更新 更多