Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install R 3.1.2 on Wheezy 7.8 (Raspbian) fails

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

I followed instructions on 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 "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.

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.

Thanks!


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 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
like image 514
Stephan Avatar asked Feb 03 '15 22:02

Stephan


1 Answers

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

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.

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
like image 98
teramonagi Avatar answered Oct 18 '22 06:10

teramonagi