Ste*_*han 7 apt r raspberry-pi raspbian
我是Linux的新手,并尝试在我的Raspberry上安装最新的R版本.我的Raspberry在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但是最后一个命令的结果是
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.
Run Code Online (Sandbox Code Playgroud)
我之前尝试安装R-2.15然后运行上面的命令.R-2.15可以成功安装,但我真的需要R-3*.
我确实浏览了网页,但没有找到任何有用的提示来解决我的具体问题,所以我感谢你能给我的任何支持.
谢谢!
如果它有用:
apt-cache policy r-base给
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
Run Code Online (Sandbox Code Playgroud)
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
Run Code Online (Sandbox Code Playgroud)
uname -a 给
Linux raspberrypi 3.18.5+ #744 PREEMPT Fri Jan 30 18:19:07 GMT 2015 armv6l GNU/Linux
Run Code Online (Sandbox Code Playgroud)
ter*_*agi 14
我有相同的情况,并决定从源代码安装它而不是从存储库安装R(apt-get命令).
这是我在Raspberry Pi 2上运行的命令.我可以成功安装并运行R(3.1.2).它可能不是你的完整答案,因为我可能已经安装了你之前没有的gcc库.如果您遇到其他问题,请告诉我.我想解决它.
正如关于这个主题的旁注,因为sudo make install过程需要很长时间(可能超过一个小时.我不确定因为我知道它之前我睡着了...),我建议你在你有足够的时候这样做在像我一样睡觉之前.
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
Run Code Online (Sandbox Code Playgroud)
问题的原因可能是 cran 存储库提供了armel软件包的版本,而不是armhf(这是您的 RPI 的预期架构)。如果这是正确的,那么您有两种解决方案:
armel软件包的版本,然后强制安装它们,尽管体系结构不匹配。它应该根据Debian wiki工作,尽管您可能会遇到性能问题:Raspberry Pi 中的 CPU 实现了 ARMv6 ISA(带有 VFP2),因此与 ARMv7+VFP3 的 Debian armhf 端口基线和其他发行版的 ARM 硬件浮点端口不兼容,它们都具有相同的基线。它与 Debian armel(armv4t、软(模拟)FP)兼容,但运行 Debian armel 端口时浮点任务会很慢。
为此,您可以尝试通过指定armel架构来重新安装软件包,例如:
apt-get install r-base:armel
Run Code Online (Sandbox Code Playgroud)
如果这种方式不起作用,您可以从http://cran.r-project.org/bin/linux/debian/wheezy-cran3/下载软件包并使用命令行手动安装它们,例如:
dpkg --install --force-architecture xxxx_armel.deb yyyy_armel.deb zzzz_armel.deb
Run Code Online (Sandbox Code Playgroud)