Install R 3.1.2 on Wheezy 7.8 (Raspbian) fails

I am new to Linux and will try to install the latest version of R on my raspberry. My raspberries work on Wheezy 7.8.

I followed the instructions in CRAN , so I

  • 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 "signing error" for the public key, as indicated on the CRAN website
  • 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. 

I tried installing R-2.15 before and then running the above commands. R-2.15 can be successfully installed, but I really need R-3 *.

I browsed the web but did not find any helpful hints for my specific problem, so I appreciate any support you could give me.

Thanks!


If applicable: 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 gives

 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 gives

 Linux raspberrypi 3.18.5+ #744 PREEMPT Fri Jan 30 18:19:07 GMT 2015 armv6l GNU/Linux 
+7
r apt raspberry-pi raspbian
source share
5 answers

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

Here is the command that I run on my raspberry Pi 2. I was able to install and run R (3.1.2). This may not be the complete answer for you, because I may have already installed a library such as gcc that you did not have before. If you encounter another problem, please let me know. I would like to solve it.

As a note to this topic, because the sudo make install process took a long time (maybe in an hour. I'm not sure because I sleep before I find out ...), I recommend that you do this when you have enough or bedtime 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 
+14
source share

The cause of your problem is the likelihood that the cran repository will provide armel package versions, not armhf (this is the expected architecture for your RPI). If this is correct, you have two solutions:

  • The first workaround may be to download the versions of armel packages, and then force them to install, despite the architecture mismatch. It is supposed to work in accordance with the Debian wiki , although there may be performance issues:

The Raspberry Pi processor implements ARMv6 ISA (with VFP2) and is thus incompatible with the base level of the ARMv7 + VFP3 port of the Debian port and ARM are hardware-floating points for other distributions that all have the same baseline. It is compatible with Debian rebar (armv4t, soft (emulated) FP), but floating point tasks will be slow when starting the Armel Debian port.

To do this, you can try reinstalling the packages by specifying the armel architecture, for example:

 apt-get install r-base:armel 

If this does not work, you can otherwise download the packages from http://cran.r-project.org/bin/linux/debian/wheezy-cran3/ and install them manually using the command line, for example:

 dpkg --install --force-architecture xxxx_armel.deb yyyy_armel.deb zzzz_armel.deb 

  1. Another solution would be to compile R from its source.
+3
source share

I resolved my initial question by updating Wheezy to Jessie . I'm not an expert, but Jesse seems to be the current version of testing Debian, and Wheezy is the stable version - see here .
To update, I followed the instructions here or here , or here . Note. The update takes quite a long time, and in the process you need to answer some questions.

A word of caution: Jesse is still experiencing, and some people recommend not using it yet, for discussion see, for example, here .
I completely tuned it to a new completely new image, and it works well.

After upgrading to Jessie, I installed R-3.1.1. using

 sudo apt-get install r-base 

And I would like to thank all those who answered my question and gave alternative ways to solve the problem above.

+1
source share

I can install R-3.1.2 in raspbian using a response from teramonagi. I confirm that it can successfully install on the B / B + model.

However, before you can actually use R (install packages and run some R-scripts), you need to increase the paging file size for Raspberry Pi due to lack of RAM (this service works very similar to the page file in the window, it is used when RAM ) You can configure it by editing one of the configuration file by entering the command below in the LX terminal.

 sudo nano /etc/dphys-swapfile CONF_SWAPSIZE=100 #(change 100 to 512 or 1024, up to you, save the file) sudo /etc/init.d/dphys-swapfile stop sudo /etc/init.d/dphys-swapfile start #(restart swap file service with new swap file size) 

Please note that some users have claimed that increasing the size of the page file could actually ruin your SD card. Therefore, apply this change at your own risk. I have been managing my Pi with this configuration for my R automation for 1 month. Nothing is known yet.

Hope this helps.

Edit: if you are using the B / B + model, I first recommend setting the size of the paging file first, and then compiling R.

+1
source share

This is what I did to update my r-base on wheezy:

HOW TO UPDATE r-base from 2.15 to 3.x on DEBIAN WHEEZY

  1. add these lines to the end of "/etc/apt/sources.list"

     deb http://cran.revolutionanalytics.com/bin/linux/debian wheezy-cran3/ deb-src http://cran.revolutionanalytics.com/bin/linux/debian wheezy-cran3/ 
  2. add missing tap pubich key

     gpg --keyserver pgpkeys.mit.edu --recv-key 06F90DE5381BA480 gpg -a --export 06F90DE5381BA480 | sudo apt-key add - 
  3. update and update

     apt-get update aptitude -t wheezy-cran3 install r-base r-base-dev 
0
source share

All Articles