中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

CentOS 6.8 安裝 R-3.5.0

發布時間:2020-07-21 19:06:37 來源:網絡 閱讀:4132 作者:lrtao2010 欄目:編程語言

1、系統環境 :CentOS release 6.8 (Final)

2、安裝包下載: wget https://cran.r-project.org/src/base/R-3/R-3.5.0.tar.gz

3、解壓并安裝:
tar xf R-3.5.0.tar.gz
./configure --enable-R-shlib=yes --with-tcltk --prefix=/usr/local/R
(報錯):
checking if bzip2 version >= 1.0.6... no

checking whether bzip2 support suffices... configure: error: bzip2 library and headers are required

(煎熬的過程從此開始,各種依賴,各種報錯,R語言是不是不想讓大家好好使用,真是服了。)

4、總結安裝方法:
4.1 下載依賴包:
bzip2-1.0.6 wget http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz
xz-5.2.2 wget http://tukaani.org/xz/xz-5.2.2.tar.gz
pcre-8.38 wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gz
curl-7.47.1 wget --no-check-certificate https://curl.haxx.se/download/curl-7.47.1.tar.gz

4.2 解壓安裝包:
tar xf bzip2-1.0.6.tar.gz -C /usr/local/
tar xf xz-5.2.2.tar.gz -C /usr/local/
tar xf pcre-8.38.tar.gz -C /usr/local/
tar xf curl-7.47.1.tar.gz -C /usr/local/
tar xf R-3.5.0.tar.gz -C /usr/local/

4.3 創建依賴包安裝目錄(上面所有的依賴包都要安裝到這個目錄,這一步很重要)
mkdir /usr/local/packages

4.4 首先安裝依賴包,順序不能亂
cd bzip2-1.0.6/
vim Makefile (修改Makefile,將第24行的CFLAGS=-Wall -Winline -O2 -g $(BIGFILES) 改為 CFLAGS=-fPIC -Wall -Winline -O2 -g $(BIGFILES),就是在-Wall 前面加上-fPIC )
make -f Makefile-libbz2_so
make clean
make
make install PREFIX=/usr/local/packages()

 cd ../xz-5.2.2/
 ./configure --prefix=/usr/local/packages
 make -j4
 make install

 cd ../pcre-8.38/
 ./configure --enable-utf8 --prefix=/usr/local/packages
 make -j4
 make install

 cd ../curl-7.47.1/
 ./configure --prefix=/usr/local/packages
 make -j4
 make install

4.5 修改環境變量(根據實際安裝路徑修改)
export PATH=/usr/local/packages/bin:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LD_LIBRARY_PATH
export CFLAGS="-I/usr/local/packages/include"
export LDFLAGS="-L/usr/local/packages/lib"

4.6 安裝R-3.5.0
cd ../R-3.5.0/
mkdir builddir
cd builddir/
mkdir /usr/local/packages/R-3.5.0
../configure --prefix=/usr/local/packages/R-3.5.0
make
make install
make pdf(生成packages的pdf幫助文檔,若無linux無圖形界面,則不需要進行此步驟)

修改環境變量 (根據實際安裝路徑修改)
echo 'export PATH=/usr/local/packages/R-3.5.0/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

4.7 測試

#R

R version 3.5.0 (2018-04-23) -- "Joy in Playing"
Copyright (C) 2018 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.

  1. 參考文檔:
    https://blog.csdn.net/huangliangbo0805/article/details/52662835
    http://blog.sina.com.cn/s/blog_6ac25ea00102whkc.html
向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

固阳县| 客服| 海林市| 威信县| 宁陕县| 蒲城县| 天镇县| 临沧市| 周口市| 昔阳县| 盐津县| 福海县| 扶沟县| 通渭县| 虹口区| 宜宾县| 页游| 庆云县| 山东| 泰兴市| 淮安市| 南宁市| 历史| 定远县| 神农架林区| 鄄城县| 瑞昌市| 邛崃市| 周口市| 临沂市| 缙云县| 泗阳县| 盐城市| 莫力| 新宁县| 嘉善县| 武威市| 龙山县| 扎兰屯市| 临汾市| 江津市|