在 Wheezy 7.8 (Raspbian) 上安装 R 3.1.2 失败 [英] Install R 3.1.2 on Wheezy 7.8 (Raspbian) fails

查看:25
本文介绍了在 Wheezy 7.8 (Raspbian) 上安装 R 3.1.2 失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Linux 的新手,并尝试在我的 Raspberry 上安装最新的 R 版本.我的 Raspberry 在 Wheezy 7.8 上运行.

I'm a newbie to Linux and try to install the latest R version on my Raspberry. My Raspberry runs on Wheezy 7.8.

我按照CRAN上的说明,所以我

  • 已添加deb http://cran.rstudio.com/bin/linux/debian wheezy-cran3//etc/apt/sources.list
  • 运行 apt-get update 成功并只给了我一个公钥的签名错误",正如 CRAN 站点上所指出的
  • 运行 apt-get install r-base
  • added deb http://cran.rstudio.com/bin/linux/debian wheezy-cran3/ to /etc/apt/sources.list
  • ran apt-get update which was successful and gave me only a "signature error" for the public key as pointed out on the CRAN-site
  • ran apt-get install r-base

但是最后一条命令的结果是

But the result of the last command is

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.  
The following information may help to resolve the situation:
The following packages have unmet dependencies:  
 r-base : Depends: r-base-core (>= 3.1.2-1~wheezycran3.0) but it is not going to be installed     
Depends: r-recommended (= 3.1.2-1~wheezycran3.0) but it is not going to be installed     
Recommends: r-base-html but it is not going to be installed     
Recommends: r-doc-html but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我之前尝试过安装 R-2.15,然后运行上述命令.R-2.15 可以安装成功,但我真的需要 R-3*.

I tried to install R-2.15 before and then run the above commands. R-2.15 could be installed successfuly, but I'd need R-3* really.

我确实浏览了网页,但没有找到针对我的具体问题的任何有用提示,因此非常感谢您能给我的任何支持.

I did browse the web, but couldn't find any useful hints for my specific problem, so I appreciate any support you could give me.

谢谢!

如果有任何用处:apt-cache policy r-base 给出

If it is of any use: apt-cache policy r-base gives

r-base:
  Installed: (none)
  Candidate: 3.1.2-1~wheezycran3.0
  Version table:
     3.1.2-1~wheezycran3.0 0
        500 http://cran.rstudio.com/bin/linux/debian/ wheezy-cran3/ Packages
     3.1.0-1~wheezycran3.0 0
        500 http://cran.rstudio.com/bin/linux/debian/ wheezy-cran3/ Packages
     2.15.1-4 0
        500 http://mirrordirector.raspbian.org/raspbian/ wheezy/main armhf Packages

apt-cache policy r-base-core 给出

r-base-core:
  Installed: (none)
  Candidate: 2.15.1-4
  Version table:
     2.15.1-4 0
        500 http://mirrordirector.raspbian.org/raspbian/ wheezy/main armhf Packages

uname -a 给出

Linux raspberrypi 3.18.5+ #744 PREEMPT Fri Jan 30 18:19:07 GMT 2015 armv6l GNU/Linux

推荐答案

我遇到了同样的情况,决定从源代码安装,而不是从存储库安装 R(apt-get 命令).

I had the same situation and decided to install that from the source code instead of install R from the repository(apt-get command).

这是我在 Raspberry Pi 2 上运行的命令.我可以成功安装和运行 R(3.1.2).这对您来说可能不是完整的答案,因为我可能已经安装了您以前没有的 gcc 之类的库.如果您遇到其他问题,请告诉我.我想解决它.

Here is the command I run on my Raspberry Pi 2. I could install and run R(3.1.2) sucessfully. It might not be complete answer for you because I might already installed the library like gcc you did not have before. If you encounter the other issue, please let me know. I would like to solve it.

作为这个主题的旁注,因为 sudo make install 过程花了很长时间(可能一个多小时.我不确定,因为我在不知不觉中睡着了......),建议你和我一样,吃饱了再睡前做这个.

Just as a side note on this topic, because sudo make install process took a long time(maybe over a hour. I'm not sure because I feel asleep before I knew it...), I recommend you to do this when you have enough or before going to sleep like me.

wget http://cran.rstudio.com/src/base/R-3/R-3.1.2.tar.gz
mkdir R_HOME
mv R-3.1.2.tar.gz R_HOME/
cd R_HOME/
tar zxvf R-3.1.2.tar.gz
cd R-3.1.2/
sudo apt-get install gfortran libreadline6-dev libx11-dev libxt-dev
./configure
make
sudo make install
R

这篇关于在 Wheezy 7.8 (Raspbian) 上安装 R 3.1.2 失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆