下载

版本:R3.2.2

下载地址:http://cran.rstudio.com/src/base/R-3/R-3.2.2.tar.gz

安装步骤:

  1. 解压 tar -zxvf R-3.2.2.tar.gz

  2. ./configure --prefix=/usr/local/R3.2.2

    ERROR:

    checking for cf77... no
    checking for fort77... no
    checking for fl32... no
    checking for af77... no
    checking for fc... no
    configure: error: No F77 compiler found

    solution:

    [root@localhost Packages]# rpm -ivh gcc-gfortran-4.4.7-4.el6.x86_64.rpm libgfortran-4.4.7-4.el6.x86_64.rpm
    warning: gcc-gfortran-4.4.7-4.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
    Preparing... ########################################### [100%]
    1:libgfortran ########################################### [ 50%]
    2:gcc-gfortran ########################################### [100%]

    ERROR:

    checking for main in -lncurses... no
    checking for main in -ltermcap... no
    checking for main in -ltermlib... no
    checking for rl_callback_read_char in -lreadline... no
    checking for history_truncate_file... no
    configure: error: --with-readline=yes (default) and headers/libs are not available

    SOLUTION:

    [root@localhost Packages]# rpm -ivh readline-devel-6.0-4.el6.x86_64.rpm ncurses-devel-5.7-3.20090208.el6.x86_64.rpm
    warning: readline-devel-6.0-4.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
    Preparing... ########################################### [100%]
    1:ncurses-devel ########################################### [ 50%]
    2:readline-devel ########################################### [100%]

    ERROR:

    checking whether iswctype exists and is declared... yes
    checking for wctrans_t... yes
    checking for mbstate_t... yes
    checking for ICU... no
    checking for X... no
    configure: error: --with-x=yes (default) and X11 headers/libs are not available

    SOLUTION:

    [root@localhost Packages]# rpm -ivh libXt-devel-1.1.3-1.el6.x86_64.rpm xorg-x11-proto-devel-7.6-25.el6.noarch.rpm libX11-devel-1.5.0-4.el6.x86_64.rpm libxcb-devel-1.8.1-1.el6.x86_64
    .rpm libXau-devel-1.0.6-4.el6.x86_64.rpm libSM-devel-1.2.1-2.el6.x86_64.rpm libICE-devel-1.0.6-1.el6.x86_64.rpm
    warning: libXt-devel-1.1.3-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
    Preparing... ########################################### [100%]
    1:xorg-x11-proto-devel ########################################### [ 14%]
    2:libICE-devel ########################################### [ 29%]
    3:libSM-devel ########################################### [ 43%]
    4:libXau-devel ########################################### [ 57%]
    5:libxcb-devel ########################################### [ 71%]
    6:libX11-devel ########################################### [ 86%]
    7:libXt-devel ########################################### [100%] #在安装libXt-devel时,报以下依赖
    pkgconfig(ice) is needed by libXt-devel-1.1.3-1.el6.x86_64 ==》libICE-devel
    pkgconfig(sm) is needed by libXt-devel-1.1.3-1.el6.x86_64 ==》libSM-devel
    pkgconfig(x11) is needed by libXt-devel-1.1.3-1.el6.x86_64 ==》libX11-devel、libxcb-devel、libXau-devel
    pkgconfig(xproto) is needed by libXt-devel-1.1.3-1.el6.x86_64 ==》xorg-x11-proto-devel

    ERROR:

    error: C++ preprocessor “/lib/cpp” fails sanity

    SOLUTION:

    ​ 安装glibc-headers和gcc-c++的rpm包

  3. make && make install

    make[3]: Entering directory `/root/Desktop/R-3.2.2/src/modules/lapack'
    make[3]: Leaving directory `/root/Desktop/R-3.2.2/src/modules/lapack'
    make[3]: Entering directory `/root/Desktop/R-3.2.2/src/modules/X11'
    make[3]: Leaving directory `/root/Desktop/R-3.2.2/src/modules/X11'
    make[2]: Leaving directory `/root/Desktop/R-3.2.2/src/modules'
    make[2]: Entering directory `/root/Desktop/R-3.2.2/src/library'
    mkdir -p -- /usr/local/R3.2.2/lib64/R/library
    installing packages ...
    building HTML index ...
    make[2]: Leaving directory `/root/Desktop/R-3.2.2/src/library'
    make[1]: Leaving directory `/root/Desktop/R-3.2.2/src'
    make[1]: Entering directory `/root/Desktop/R-3.2.2/tests'
    make[1]: Nothing to be done for `install'.
    make[1]: Leaving directory `/root/Desktop/R-3.2.2/tests'
  4. vim /etc/profile

    export R_HOME=/usr/local/R3.2.2
    export PATH=.:$PATH:$R_HOME/bin:$R_HOME
  5. 安装rstudio

    [root@localhost ~]# wget http://download2.rstudio.org/rstudio-server-0.98.1091-x86_64.rpm
    --2018-04-10 03:31:57-- http://download2.rstudio.org/rstudio-server-0.98.1091-x86_64.rpm
    Resolving download2.rstudio.org... 54.192.212.48, 54.192.212.112, 54.192.212.214, ...
    Connecting to download2.rstudio.org|54.192.212.48|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 55476487 (53M) [application/x-redhat-package-manager]
    Saving to: “rstudio-server-0.98.1091-x86_64.rpm” 100%[=====================================================================================================================================================>] 55,476,487 28.8K
    /s in 23m 20s 2018-04-10 03:55:18 (38.7 KB/s) - “rstudio-server-0.98.1091-x86_64.rpm” saved [55476487/55476487] [root@localhost ~]# ll
    total 68040
    -rw-------. 1 root root 3310 Mar 10 2017 anaconda-ks.cfg
    -rw-r--r-- 1 root root 696 Jul 21 2017 derby.log
    drwxr-xr-x. 5 root root 4096 Apr 10 03:20 Desktop
    drwxr-xr-x. 2 root root 4096 Mar 10 2017 Documents
    drwxr-xr-x. 2 root root 4096 Mar 10 2017 Downloads
    -rw-r--r-- 1 root root 14973 Jul 21 2017 hs_err_pid6312.log
    -rw-r--r--. 1 root root 41955 Mar 10 2017 install.log
    -rw-r--r--. 1 root root 9154 Mar 10 2017 install.log.syslog
    drwxr-xr-x 5 root root 4096 Mar 21 2017 metastore_db
    drwxr-xr-x. 2 root root 4096 Mar 10 2017 Music
    drwxr-xr-x. 2 root root 4096 Mar 10 2017 Pictures
    drwxr-xr-x. 2 root root 4096 Mar 10 2017 Public
    drwxr-xr-x 22 root root 4096 Dec 14 01:00 python
    -rw-r--r-- 1 root root 14026384 Dec 13 22:58 Python-2.7.tgz
    -rw-r--r--. 1 root root 65 Mar 11 2017 redhat-6.5_me_missing-rpms.lst
    -rw-r--r-- 1 root root 55476487 Nov 6 2014 rstudio-server-0.98.1091-x86_64.rpm
    drwxr-xr-x 2 root root 4096 Jul 12 2017 spark-warehouse
    drwxr-xr-x. 2 root root 4096 Mar 10 2017 Templates
    -rw-r--r-- 1 root root 849 Feb 6 23:11 testHive.py
    drwxr-xr-x. 2 root root 4096 Mar 10 2017 Videos
    -rw-r--r-- 1 root root 18280 Aug 14 2017 zookeeper.out
    [root@localhost ~]# rpm -ivh rstudio-server-0.98.1091-x86_64.rpm
    Preparing... ########################################### [100%]
    1:rstudio-server ########################################### [100%]
    groupadd: group 'rstudio-server' already exists
    rsession: no process killed
    rstudio-server start/running

    ERROR:

    [root@localhost ~]# rstudio-server start
    /usr/lib/rstudio-server/bin/rserver: error while loading shared libraries: libssl.so.6: cannot open shared object file: No such file or directory
    /usr/sbin/rstudio-server: line 24: return: can only return from a function or sourced script
    initctl: Job is already running: rstudio-server
    [root@localhost ~]# rstudio-server verify-installation
    rstudio-server stop/waiting
    /usr/lib/rstudio-server/bin/rserver: error while loading shared libraries: libssl.so.6: cannot open shared object file: No such file or directory
    rstudio-server start/running

    SOLUTION:

    [root@localhost ~]# cd /usr/lib64
    [root@localhost lib64]# ll *ssl*
    lrwxrwxrwx. 1 root root 27 Mar 11 2017 libnss_compat_ossl.so.0 -> libnss_compat_ossl.so.0.0.0
    -rwxr-xr-x. 1 root root 81832 Mar 16 2010 libnss_compat_ossl.so.0.0.0
    -rwxr-xr-x. 1 root root 249368 Oct 15 2013 libssl3.so
    lrwxrwxrwx. 1 root root 16 Mar 10 2017 libssl.so.10 -> libssl.so.1.0.1e
    -rwxr-xr-x. 1 root root 439912 Sep 27 2013 libssl.so.1.0.1e openssl:
    total 4
    drwxr-xr-x. 2 root root 4096 Mar 10 2017 engines
    [root@localhost lib64]# ln -s libssl.so.1.0.1e libssl.so.6
    [root@localhost lib64]# ll *ssl*
    lrwxrwxrwx. 1 root root 27 Mar 11 2017 libnss_compat_ossl.so.0 -> libnss_compat_ossl.so.0.0.0
    -rwxr-xr-x. 1 root root 81832 Mar 16 2010 libnss_compat_ossl.so.0.0.0
    -rwxr-xr-x. 1 root root 249368 Oct 15 2013 libssl3.so
    lrwxrwxrwx. 1 root root 16 Mar 10 2017 libssl.so.10 -> libssl.so.1.0.1e
    -rwxr-xr-x. 1 root root 439912 Sep 27 2013 libssl.so.1.0.1e
    lrwxrwxrwx 1 root root 16 Apr 10 18:26 libssl.so.6 -> libssl.so.1.0.1e
    [root@localhost lib64]# ll *libcrypto*
    lrwxrwxrwx 1 root root 19 Apr 10 18:30 libcrypto.so -> libcrypto.so.1.0.1e
    lrwxrwxrwx. 1 root root 19 Mar 10 2017 libcrypto.so.10 -> libcrypto.so.1.0.1e
    -rwxr-xr-x. 1 root root 1949440 Sep 27 2013 libcrypto.so.1.0.1e
    [root@localhost lib64]# ln -s libcrypto.so.1.0.1e libcrypto.so.6
    [root@localhost lib64]# ll *libcrypto*
    lrwxrwxrwx 1 root root 19 Apr 10 18:30 libcrypto.so -> libcrypto.so.1.0.1e
    lrwxrwxrwx. 1 root root 19 Mar 10 2017 libcrypto.so.10 -> libcrypto.so.1.0.1e
    -rwxr-xr-x. 1 root root 1949440 Sep 27 2013 libcrypto.so.1.0.1e
    lrwxrwxrwx 1 root root 19 Apr 10 18:34 libcrypto.so.6 -> libcrypto.so.1.0.1e

    ERROR:

    [root@localhost lib64]# rstudio-server start
    initctl: Job is already running: rstudio-server
    [root@localhost lib64]# rstudio-server verify-installation
    rstudio-server stop/waiting
    11 Apr 2018 01:35:45 [rserver] ERROR Unable to find libR.so in expected locations within R Home directory /usr/local/R3.2.2/lib64/R; LOGGED FROM: bool core::r_util::<unnamed
    >::detectRLocationsUsingR(const std::string&, core::FilePath*, core::FilePath*, core::config_utils::Variables*, std::string*) /root/rstudio/src/cpp/core/r_util/REnvironmentPosix
    .cpp:544
    11 Apr 2018 01:35:45 [rserver] ERROR R shared library (/usr/local/R3.2.2/lib64/R/lib/libR.so) not found. If this is a custom build of R, was it built with the --enable-R-shlib option
    ?; LOGGED FROM: bool core::r_util::<unnamed>::validateREnvironment(const core::r_util::EnvironmentVars&, const core::FilePath&, std::string*) /root/rstudio/src/cpp/core/r_util
    /REnvironmentPosix.cpp:368
    R shared library (/usr/local/R3.2.2/lib64/R/lib/libR.so) not found. If this is a custom build of R, was it built with the --enable-R-shlib option?
    rstudio-server start/running, process 42212

    SOLUTION:

    [root@localhost Packages]# rpm -ivh openssl-1.0.1e-15.el6.x86_64.rpm
    warning: openssl-1.0.1e-15.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
    Preparing... ########################################### [100%]
    package openssl-1.0.1e-15.el6.x86_64 is already installed
    [root@localhost Packages]# rpm -ivh openssl-devel-1.0.1e-15.el6.x86_64.rpm krb5-devel-1.10.3-10.el6_4.6.x86_64.rpm keyutils-libs-devel-1.4-4.el6.x86_64.rpm libcom_err-devel-1.41.12-18
    .el6.x86_64.rpm libselinux-devel-2.0.94-5.3.el6_4.1.x86_64.rpm libsepol-devel-2.0.41-4.el6.x86_64.rpm
    warning: openssl-devel-1.0.1e-15.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
    Preparing... ########################################### [100%]
    1:libsepol-devel ########################################### [ 17%]
    2:libselinux-devel ########################################### [ 33%]
    3:libcom_err-devel ########################################### [ 50%]
    4:keyutils-libs-devel ########################################### [ 67%]
    5:krb5-devel ########################################### [ 83%]
    6:openssl-devel ########################################### [100%]

    ERROR:

    ERROR Unable to find libR.so in expected locations within R Home directory

    SOLUTION: 重新编译R

    ./configure --enable-R-shlib --prefix=/usr/local/R3.2.2

    ERROR:

    [root@localhost R-3.2.2]# rstudio-server verify-installation
    11 Apr 2018 01:50:41 [rsession-rstudio-server] ERROR r error 4 (R code execution error) [errormsg=Error in tools:::httpdPort > 0L :
    comparison (6) is possible only for atomic and list types
    ]; OCCURRED AT: core::Error r::exec::<unnamed>::evaluateExpressionsUnsafe(SEXPREC*, SEXPREC*, SEXPREC**, r::sexp::Protect*) /root/rstudio/src/cpp/r/RExec.cpp:148; LOGGED FROM: core
    ::Error session::modules::help::initialize() /root/rstudio/src/cpp/session/modules/SessionHelp.cpp:892
    rstudio-server start/running, process 80692

linux下安装R的更多相关文章

  1. 在Linux下安装R语言软件

    安装环境: centos.R3.0.1 1.在终端下下载: #cd /usr/local/ #wget http://mirror.bjtu.edu.cn/cran/src/base/R-3/R-3. ...

  2. linux下安装R第三方包forecast

    ERROR: [root@localhost soft]# R CMD INSTALL curl_3.1.tar.gz WARNING: ignoring environment value of R ...

  3. Linux下安装Tomcat服务器和部署Web应用

    一.上传Tomcat服务器

  4. Linux下安装使用Solr

    Linux下安装使用Solr 1.首先下载Solr.mmseg4j分词包.tomcat并解压,这用google.百度都可以搜索得到下载地址. 2.因为要使用到中文分词,所以要设置编码,进入tomcat ...

  5. Linux下安装和配置JDK与Tomcat(升级版)

    在这个版本 Linux下安装和配置JDK与Tomcat(入门版) 的基础上优化升级 1.下载相关软件 apache-tomcat-6.0.37.tar.gz jdk-6u25-linux-i586-r ...

  6. CentOS linux下安装和配置Apache+SVN(用浏览器http方式访问SVN目录)

    在CentOS linux下安装SVN,我们可以进行以下步骤: 第一步:安装CentOS Linux操作系统,并在CentOS安装进行的同时,自定义安装这一步,一定要勾选Subversion(在“开发 ...

  7. linux下安装7z命令及7z命令的使用

    本文主要介绍了在linux下安装7z命令的方法,同时介绍了7z命令的使用.7z压缩格式拥有众多优点,具有极高的压缩比率,如果你还不了解,请看文章:7z格式.LZMA压缩算法和7-Zip详细介绍. re ...

  8. (转)Linux下安装rar fou linux

    在Linux下安装rar fou linux rar for linux 软件下载地址:http://www.rarsoft.com/download.htm 到目前为止最新的版本为4.10 beta ...

  9. Linux下安装loadrunner步骤及遇到的问题

    Linux下实现压力测试,只能在Linux下安装加压器---load-generator,然后通过本地录制脚本,通过loadrunner controller 的Scenario-->Load ...

随机推荐

  1. redis 单线程的理解

    单线程模型 Redis客户端对服务端的每次调用都经历了发送命令,执行命令,返回结果三个过程.其中执行命令阶段,由于Redis是单线程来处理命令的,所有每一条到达服务端的命令不会立刻执行,所有的命令都会 ...

  2. L2Dwidget.js L2D网页动画人物添加

    hexo 添加live2d看板动画 https://www.jianshu.com/p/3a6342e16e57 首先贴出官网代码 官网地址配置:https://www.npmjs.com/packa ...

  3. 把两个object对象合并成一个对象 属性名称相同的变为后面对象的值

    object.assign(from,obj)------object.assign(目标对象,被合并的对象)

  4. 精确率与回召率与 F1-Meature

    例子: true positive(真正例): 把 Colin power预测为Colin power(55) false positive(假正例): 把 其他人预测为Colin power(4+1 ...

  5. (转)Java并发编程:核心理论

    原文链接:https://www.cnblogs.com/paddix/p/5374810.html Java并发编程系列: Java 并发编程:核心理论 Java并发编程:Synchronized及 ...

  6. 关于Linux单机、集群部署FastDFS分布式文件系统的步骤。

    集群部署:2台tarcker服务器,2台storage服务器. 192.168.201.86   ---------(trackerd+storage+nginx) 192.168.201.87   ...

  7. Maven 技巧知多少

    Maven是一种帮助我们快速构建项目的小工具,它可以解决我们在项目过程中手动导包造成的版本不一致的问题,以及找包困难等问题,同时通过Maven创建的项目都有固定的目录格式,使得约定优于配置,我们通过固 ...

  8. 表单的 submit 和 onsubmit 的用法 与区别

    submit与onsubmit 发生顺序:onsubmit -> submit 1.阻止表单提单: <script>function submitFun(){    //逻辑判断   ...

  9. 第06课:GDB 常用命令详解(下)

    本课的核心内容: disassemble 命令 set args 和 show args 命令 tbreak 命令 watch 命令 display 命令 6.1 disassemble 命令 当进行 ...

  10. 第一次把本地项目与git相连

    原文:https://blog.csdn.net/a987625922/article/details/82189863 新建远程仓库(github或者gitee) 将本地仓库转换成版本库,并将文件添 ...