如何在Ubuntu上将R版本3.2.2降级到3.1.1版

时间:2015-10-07 05:49:09

标签: r

我使用apt get安装它,它现在说3.2.2 - 这是一个违规版本。我如何降级到3.1.1?

更新

install.packages(c("batch", "bitops", "boot", "caTools", "data.table", "doMC", "doSNOW", "ggplot2", "glmnet", "lda", "Matrix", "matrixStats", "moments", "plotrix", "psych", "reshape", "topicmodels", "wordcloud", "methods"), dependencies=TRUE)

Warning messages:
1: package ‘methods’ is not available (for R version 3.2.2) 
2: In install.packages(c("boot", "caTools", "data.table", "doMC", "doSNOW",  :
  installation of package ‘RCurl’ had non-zero exit status
3: In install.packages(c("boot", "caTools", "data.table", "doMC", "doSNOW",  :
  installation of package ‘curl’ had non-zero exit status
4: In install.packages(c("boot", "caTools", "data.table", "doMC", "doSNOW",  :
  installation of package ‘XML’ had non-zero exit status
5: In install.packages(c("boot", "caTools", "data.table", "doMC", "doSNOW",  :
  installation of package ‘OAIHarvester’ had non-zero exit status
6: In install.packages(c("boot", "caTools", "data.table", "doMC", "doSNOW",  :
  installation of package ‘topicmodels’ had non-zero exit status

如何降级?

1 个答案:

答案 0 :(得分:17)

所以我最近遇到了同样的问题。 这是一个解决方案:

  1. 删除当前安装的R版本

    sudo apt-get remove r-base-core
    sudo apt-get autoremove 
    
  2. 找到您需要的版本,

    apt-cache showpkg r-base
    
  3. 它将如下所示:

    Package: r-base
    Versions: 
    3.2.2-1precise0     (/var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_precise_Packages)
     Description Language: 
                 File:     /var/lib/apt/lists/cran.rstudio.com_bin_linux_ubuntu_precise_Packages
                  MD5: 5787ca79ed716232c4cc2087ed9b425b
    

    之后,查找所需的版本并进行安装。 但是,安装r-base会再次抛出错误,所以只需执行:

    sudo apt-get install r-base-core=3.1.1-1precise0