linux系统centos7.9安装R

 

1、查看系统版本

[root@centos7PC1 home]# lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.9.2009 (Core)
Release:        7.9.2009
Codename:       Core
[root@centos7PC1 home]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)

 

2、测试R

[root@centos7PC1 home]# R  ## 没有R
bash: R: command not found...

 

3、安装R

复制代码
[root@centos7PC1 home]# yum install epel-release -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.huaweicloud.com
 * extras: mirrors.huaweicloud.com
 * updates: mirrors.huaweicloud.com
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================================
 Package                             Arch                          Version                       Repository                     Size
=====================================================================================================================================
Installing:
 epel-release                        noarch                        7-11                          extras                         15 k

Transaction Summary
=====================================================================================================================================
Install  1 Package

Total download size: 15 k
Installed size: 24 k
Downloading packages:
epel-release-7-11.noarch.rpm                                                                                  |  15 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : epel-release-7-11.noarch                                                                                          1/1
  Verifying  : epel-release-7-11.noarch                                                                                          1/1

Installed:
  epel-release.noarch 0:7-11

Complete!
复制代码

 

复制代码
[root@centos7PC1 home]# yum install R -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.huaweicloud.com
 * epel: mirror.sjtu.edu.cn
 * extras: mirrors.huaweicloud.com
 * updates: mirrors.huaweicloud.com
Resolving Dependencies
--> Running transaction check
---> Package R.x86_64 0:3.6.0-1.el7 will be installed

…………

  zlib-devel.x86_64 0:1.2.7-18.el7
  zziplib.x86_64 0:0.13.62-12.el7

Dependency Updated:
  freetype.x86_64 0:2.8-14.el7_9.1                                      java-1.8.0-openjdk.x86_64 1:1.8.0.282.b08-1.el7_9
  java-1.8.0-openjdk-headless.x86_64 1:1.8.0.282.b08-1.el7_9            tzdata-java.noarch 0:2021a-1.el7

Complete!
复制代码

 

4、测试R

复制代码
[root@centos7PC1 home]# R  ## 可以调用

R version 3.6.0 (2019-04-26) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> sample(1:10,5)
[1]  4 10  2  6  3
> seq (5)
[1] 1 2 3 4 5
> seq (1,10,2)
[1] 1 3 5 7 9
复制代码

 

posted @   小鲨鱼2018  阅读(794)  评论(0编辑  收藏  举报
编辑推荐:
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
点击右上角即可分享
微信分享提示