2016-10-05 16 views
0

Ubuntu 16.04にR 3.0.2をインストールしようとしています。古いバージョンのRのリポジトリを追加しようとしましたが、R 3.0.2のパッケージはapt-getには見つかりませんでした。誰かがUbuntuの新しいバージョンに古いバージョンのRをインストールしようとしましたか?どのようなステップがあるのか​​分かりますか?UbuntuでR 3.0.2をインストールする16.04

また、apt-get installコマンドでバージョンを指定しようとしましたが、正しいパッケージが見つかりませんでした。

+0

現在のRバージョンをインストールしない特別な理由はありますか? – Roland

+0

ここにロードしてインストールしますか?既に試しましたか? http://cran.r-project.org/src/base/R-3/R-3.0.2.tar.gz –

+0

@ローランド、はい。私はもう互換性のないパッケージを使用しています。まだ更新中です。 – jackeblagare

答えて

1

私はあなたのケースでは最良の選択肢はR.をコンパイルし、あなたがそのようなことをやったことがない場合は、端末内のこの小さなスクリプトに従うことです参照してください。

mkdir R_alternatives 
cd R_alternatives 
mkdir src 
mkdir 3.0.2 
cd src 
wget https://cran.r-project.org/src/base/R-3/R-3.0.2.tar.gz 
tar -xvf R-3.0.2.tar.gz 
cd R-3.0.2 

#In my opinion is better to compile in one folder (avoid uncompress tar.gz source again, if you get any errors) 

mkdir BuildDir 
cd BuildDir 
# this step will take around 2 minutes 
./../configure --prefix=/home/'user'/R_alternatives/3.0.2 
# These two will take longer!! 
make 
make install 

# following the prefix in 'configure' your R libraries are going to be installed in /home/'user'/R_alternatives/3.0.2/lib64/R/library/ 
# Hence, each time you compile a new R version, it will have its own libraries (this avoid R packages versions problems) 
# If you wish more than one library version for the same R version, you must create a new folder and then run 
export R_LIBS=/'path_to_your_new_folder' 

# If you plan to use this R version in RStudio, you have to edit ~/.bash_profile, therefore you must run: 
vi ~/.bash_profile 
#or, It is up to you! 
gedit ~/.bash_profile 

#Then you put this line in end of the file 

PATH=/home/'user'/R_alternatives/3.0.2/bin:$PATH 
export PATH 

# OR... 

RSTUDIO_WHICH_R=/home/'user'/R_alternatives/3.0.2/bin/R 
export RSTUDIO_WHICH_R 

#PS: You can also set the R_LIBS here, in the same way! 
0

まず第一に、古い同様の&ためhereを参照してくださいあなたの質問。様々なUbuntuのバージョンの古いRリリース(ほとんどLTSリリース)の

プリコンパイルされたバイナリは、DEBの次のWebサイトなどから入手できます。

https://cran.r-project.org/bin/linux/ubuntu/ 

残念ながら、Rが存在していないようです3.0 .2 xenialのdebパッケージ。正確なものだけがR 3.0.2パッケージを持っています。 正確なパッケージをxenialにインストールしようとすると、それ自体の問題が設定されている可能性があります。

Facottonsのアドバイスに従ってソースからコンパイルするのが最適かもしれません。

関連する問題