linux 中非root用户安装R

 

001、下载R安装包:官网

 

 

[liujiaxin02@PC1 r_package]$ wget https://mirrors.tuna.tsinghua.edu.cn/CRAN/src/base/R-4/R-4.2.2.tar.gz --no-check-certificate
[liujiaxin02@PC1 r_package]$ ls
R-4.2.2.tar.gz

 

 

002、配置

[liujiaxin02@PC1 r_package]$ tar -xzvf R-4.2.2.tar.gz
[liujiaxin02@PC1 r_package]$ cd R-4.2.2/
[liujiaxin02@PC1 R-4.2.2]$ ./configure --prefix=/home/liujiaxin02/r_dir

 

 

003、编译

[liujiaxin02@PC1 R-4.2.2]$ make

 

 

004、安装

[liujiaxin02@PC1 R-4.2.2]$ make install

 

 

005、测试R命令

[liujiaxin02@PC1 R-4.2.2]$ ls
bin          config.status  doc      lib      Makeconf     Makefile.in     Makefrag.m  share         tests
ChangeLog    configure      etc      library  Makeconf.in  Makefrag.cc     modules     src           tools
config.log   configure.ac   include  libtool  Makefile     Makefrag.cc_lo  po          stamp-java    VERSION
config.site  COPYING        INSTALL  m4       Makefile.fw  Makefrag.cxx    README      SVN-REVISION  VERSION-NICK
[liujiaxin02@PC1 R-4.2.2]$ cd bin
[liujiaxin02@PC1 bin]$ ls
BATCH  check    config  INSTALL     libtool  mkinstalldirs  R     Rd2pdf  Rdiff   Rprof    rtags  Stangle
build  COMPILE  exec    javareconf  LINK     pager          Rcmd  Rdconv  REMOVE  Rscript  SHLIB  Sweave
[liujiaxin02@PC1 bin]$ ./R

R version 4.2.2 (2022-10-31) -- "Innocent and Trusting"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-pc-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.

 

posted @ 2023-01-14 00:48  小鲨鱼2018  阅读(575)  评论(0编辑  收藏  举报