Can't install latest version of R on ARM Chromebook

So I'm running Ubuntu 14.04 through Crouton, and every time I install R it only installs v3.0.2. I've tried reinstalling it, using PPA, and other things but nothing's worked so far.

11

1 Answer

I have quite bad news: in this case, where the packages are broken for your architecture, the PPA maintainer said that it was unlikely the irregularities would be fixed any time before June. He's off on vacation, and said that "R-dev is really only for making sure development releases are building and working, and are not designed to be used for anything other than that".

However, there is an even newer version of R out, v3.3.0, and it is a fairly straight-forward installation from source code. I have here step-by-step instructions for installing from source working in a terminal, which you seem comfortable enough with and probably don't need, but for the sake of a more complete answer. The .deb files available from the r-project site seem only to be of i386 and amd64, so building it yourself seems to be the way forward.

First download the source code:

aich@compy:~$ cd Downloads/
aich@compy:Downloads$ wget 

Then expand the compressed archive file and move to the build directory with:

aich@compy:Downloads$ tar -xvf R-3.3.0.tar.gz
aich@compy:Downloads$ cd R-3.3.0/

This source package doesn't have all of the resources you will need to build the language; also it does require that we resolve the dependencies ourselves. I've made a laundry list here, starting with a bare new VM of Ubuntu Desktop:

aich@compy:R-3.3.0$ sudo apt install build-essential gfortran libbz2-dev libcurl4-openssl-dev libjpeg-dev liblzma-dev libpcre3-dev libpng12-dev libreadline-dev libtiff5-dev libx11-dev libxt-dev zlib1g-dev

This list of packages should be 100% the same for your armhf install of Ubuntu as my amd64, but I was building on 16.04 rather than 14.04 (sorry didn't have a downloaded iso ready-to-go for the VM). These packages contain library extensions to the default languages on the Ubuntu install (for building new programs that can use compression, https, etc). If you are curious about what they are, query any entry with $ apt show <package name> and it will provide a short description. This is not every possible library for R, but the minimum required to have basic functionality. Now we check to see if we have all the libraries we need and if they are a new enough version:

aich@compy:R-3.3.0$ ./configure (... whole bunch of ouput from Autotools checks ...)

If it stops without nice output like this:

R is now configured for <your arch here>-pc-linux-gnu Source directory: . Installation directory: /usr/local C compiler: gcc -g -O2 Fortran 77 compiler: f95 -g -O2 C++ compiler: g++ -g -O2 C++11 compiler: g++ -std=c++11 -g -O2 Fortran 90/95 compiler: gfortran -g -O2 Obj-C compiler: Interfaces supported: X11 External libraries: readline, curl Additional capabilities: PNG, JPEG, TIFF, NLS Options enabled: shared BLAS, R profiling Capabilities skipped: cairo, ICU Options not enabled: memory profiling Recommended packages: yes

... then stop, and read the error above the command prompt carefully. Consider, again carefully, if having v3.3.0 instead of v3.0.2 is worth the trouble (I have no idea what the feature improvements are at all). Track down the missing dependency with a little apt-fu $ apt search <thing that seems to be missing>. But if it works, and I believe it should, build and install the software:

aich@compy:R-3.3.0$ make -j4
( ... a whole ton of output from GCC ... )
aich@compy:R-3.3.0$ sudo make install -j4

Hopefully that should be all you need to do. To get into the REPL, type $ R and away you go.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like