gpt4 book ai didi

r - 如何在 CentOS 上安装最新版本的 R(目前为 4.0.0)?

转载 作者:行者123 更新时间:2023-12-04 12:59:00 25 4
gpt4 key购买 nike

标题几乎说明了这一点。我已经安装了 epel,当我尝试 yum 新版本时,我得到了 3.6.0 版本。

我知道可以从源代码编译它,但 CRAN 似乎想让我远离它(我很乐意接受)。

最佳答案

RStudio 文档有一个关于如何在 CentOS 7 和 8 上安装几乎所有 R 版本(包括 4.X.X)的详细教程:https://docs.rstudio.com/resources/install-r/#optional-install-recommended-packages
如果链接被删除,我在这里详细说明 CentOS 7 的步骤:

# Enable the Extra Packages for Enterprise Linux (EPEL) repository
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

# On RHEL 7, enable the Optional repository
sudo subscription-manager repos --enable "rhel-*-optional-rpms"

# If running RHEL 7 in a public cloud, such as Amazon EC2, enable the
# Optional repository from Red Hat Update Infrastructure (RHUI) instead
sudo yum install yum-utils
sudo yum-config-manager --enable "rhel-*-optional-rpms"

# Download and install R
export R_VERSION=4.0.0
curl -O https://cdn.rstudio.com/r/centos-7/pkgs/R-${R_VERSION}-1-1.x86_64.rpm
sudo yum install R-${R_VERSION}-1-1.x86_64.rpm

# Verify installation
/opt/R/${R_VERSION}/bin/R --version

# Create symlink to R
sudo ln -s /opt/R/${R_VERSION}/bin/R /usr/local/bin/R
sudo ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/local/bin/Rscript

关于r - 如何在 CentOS 上安装最新版本的 R(目前为 4.0.0)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61801750/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com