首先,更新存储库列表:
# apt-get udpate
我们将使用的curl
命令下载cran r-3.2.1源代码,如果还没有安装curl,则使用下面命令安装:
# apt-get install curl
接下来,安装所有编译依赖项才能编译CRAN R-3.2.1源代码:
# apt-get build-dep -y r-base
下载Cran R-3.2.1源代码tar包并提取其内容:
# curl https://cran.r-project.org/src/base/R-3/R-3.2.1.tar.gz | tar xz
转到提取的“R-3.2.1”目录:
# cd R-3.2.1
编译和安装CRAN R-3.2.1:
./configure; make; make install
确认已安装Cran-R版本:
# R --version R version 3.2.1 (2014-06-18) -- "World-Famous Astronaut" Copyright (C) 2014 The R Foundation for Statistical Computing Platform: x86_64-unknown-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under the terms of the GNU General Public License versions 2 or 3. For more information about these matters see http://www.gnu.org/licenses/.
运行R:
$R R version 3.2.1 (2014-06-18) -- "World-Famous Astronaut" Copyright (C) 2014 The R Foundation for Statistical Computing Platform: x86_64-unknown-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. 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. >
日期:2020-07-07 20:54:46 来源:oir作者:oir