找到你要的答案

Q:Revolution R: installation on debian jessie

Q:R:在安装Debian杰西革命

I need to install Revolution R on a Debian Jessie (version 8, 64-bit).

On my system there is already installed R 3.1.1 and Rstudio.

The Revolution download page give me three installation package for Ubuntu: 12, 14, 15 (older LTS, current LTS, current version). Rstudio package give instead a single package for both Ubuntu 12.04+ and Debian 8+ (32 and 64-bit versions).

There is a way to understand what is the right package to install?

EDIT: I see from the community group that Debian is not officially supported, but should be OK using an Ubuntu packages.

我需要在Debian Jessie安装革命R(8版,64位)。

在我的系统中已经安装有R 3.1.1 RStudio。

革命的下载页面给我的Ubuntu三安装包:12,14,15(老的LTS,电流LTS,当前版本)。RStudio包给相反为Ubuntu 12.04 +和Debian 8 +单包(32和64位版本)。

有一种方法来理解什么是正确的包安装?

编辑:我看到从Debian不正式支持的社区团体,但应该可以使用Ubuntu的软件包。

answer1: 回答1:

It seems OK to install Revolution R on Debian Jessie.

Some precautions:

  • On my system there is libjpeg8 as missing dependency. To avoid this, I installed from testing repository.

    1. I tried to install the package using gdebi to install and resolve all necessary dependencies.
    2. libjpeg8 is missing from stable repository, so I take it from testing repository, protecting other packages with pinning preferences:

      sudo printf "# testing\ndeb http://httpredir.debian.org/debian/ stretch main contrib non-free" >> /etc/apt/sources.list
      
      sudo vim /etc/apt/preferences
      # old
      Package: *
      Pin: release o=Debian,a=stable
      Pin-Priority: 980
      
      Package: *
      Pin: release a=jessie-backports
      Pin-Priority: 900
      
      # new 
      Package: libjpeg8 
      Pin: release o=Debian,a=stretch 
      Pin-Priority: 990
      

    Note: The installed package is the libjpeg8:i386 version.

  • the installation process of Revolution R erases the original R and Rscript executables, so in my opinion it's better backup them (as root or using sudo):

    sudo cp -i /usr/bin/Rscript /usr/bin/Rscript-original
    sudo cp -i /usr/bin/R /usr/bin/R-original
    
  • Just in case you need to restore the original R and Rstudio executables without a backup, should be enough to reinstall the r-base-core package:

    sudo apt-get --reinstall install r-base-core -V
    
  • using Revolution R with Rstudio should be fine. However if you would use a custom version of R (the original one, e.g.) with Rstudio it's possible to follow these instructions:

    export RSTUDIO_WHICH_R=/usr/bin/R-original
    echo "export RSTUDIO_WHICH_R=/usr/bin/R-original" >> ~/.profile
    source ~/.profile
    # logout and login again to use this profile also outside the bash
    

它似乎可以在Debian Jessie安装革命R。

一些注意事项:

  • 在我的系统中有libjpeg8失踪的依赖。为了避免这种情况,我从测试库安装。

    1. I tried to install the package using gdebi to install and resolve all necessary dependencies.
    2. libjpeg8由稳定库失踪,所以我把它从测试库,以保护其他包扎的偏好:

      sudo printf "# testing\ndeb http://httpredir.debian.org/debian/ stretch main contrib non-free" >> /etc/apt/sources.list
      
      sudo vim /etc/apt/preferences
      # old
      Package: *
      Pin: release o=Debian,a=stable
      Pin-Priority: 980
      
      Package: *
      Pin: release a=jessie-backports
      Pin-Priority: 900
      
      # new 
      Package: libjpeg8 
      Pin: release o=Debian,a=stretch 
      Pin-Priority: 990
      

    注意:安装包是libjpeg8 i386版本。

  • 革命R安装过程中删除原来的R和Rscript的可执行文件,所以我认为这是更好的备份(如根或使用sudo):

    sudo cp -i /usr/bin/Rscript /usr/bin/Rscript-original
    sudo cp -i /usr/bin/R /usr/bin/R-original
    
  • 万一你需要没有备份恢复原来的R和RStudio可执行文件,足以重新安装r-base-core包:

    sudo apt-get --reinstall install r-base-core -V
    
  • 使用R Rstudio革命应该没事。但是如果你想使用一个定制版本的R(原来的,例如)和RStudio可以遵循这些指示:

    export RSTUDIO_WHICH_R=/usr/bin/R-original
    echo "export RSTUDIO_WHICH_R=/usr/bin/R-original" >> ~/.profile
    source ~/.profile
    # logout and login again to use this profile also outside the bash
    
linux  r  ubuntu  debian  revolution-r