Skip to content

Debian Testing: ~/.Renviron seems to not being read (R_LIBS not set)

2 messages · Marius Hofert, Johannes Ranke

#
On Tue, Mar 31, 2015 at 2:05 AM, Johannes Ranke <jranke at uni-bremen.de> wrote:
Dear Johannes,

... no one in his/her clear mind would go that way unless necessary. I
have given reasons for when and why it is necessary.
... because it is trivial from the procedure I described. Replace the
version number by 'devel' or 'rc' (for patched) and the rest remains
pretty much the same (obviously adapting the download link).
yes, that's a use case. Or if you need >= 2 R versions to check back
with older versions or if a user with a different R version reports a
bug and you can not reproduce it with the version you have etc...
I frequently install new R-devel versions... simply removing
/usr/local/R/R-devel* first. There might be side-effects I don't know,
but that never gave me problems.
That sounds good. I just modified the instructions to R-devel and used
a more "Kurt-like" naming convention:

1) sudo nano /etc/apt/sources.list
   deb http://stat.ethz.ch/CRAN/bin/linux/debian jessie-cran3/
   deb-src http://stat.ethz.ch/CRAN/bin/linux/debian jessie-cran3/
2) sudo apt-get update # => fails, but note the number of the missing
public key; then do:
   sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key
<NUMBER> # <NUMBER> = number after NO_PUBKEY
3) Build dependencies (compilers etc.):
   sudo apt-get build-dep r-base
4) Install path:
   sudo mkdir /usr/local/R
   sudo chown <user>:<user> /usr/local/R
5) Get and unpack R:
   cd /usr/local/R
   # if it exists, delete the old ./R-devel, ./R-devel-build,
./R-devel.tar.gz etc. then do:
   wget ftp://ftp.stat.math.ethz.ch/Software/R/R-devel.tar.gz # see
CRAN -> R Sources for the link
   tar -xzf R-devel.tar.gz
   mv R-devel R-devel_source
6) Set up build directory (don't use ./configure within source
directory; sources would be lost)
   mkdir R-devel_build
7) Configure:
   cd R-devel_build
   ../R-devel_source/configure # ~2min
8) Build:
   make # 10min (desktop); much longer on Android (seems to hang but
just let it run!)
   make check # ~3min
   make pdf # ~2min
   make info # ~1min
9) Create a (symbolic) link (don't use 'make install'):
   cd ..
   ln -s /usr/local/R/R-devel_build/bin/R /usr/local/R/R-devel
10) mkdir /usr/local/R/library
11) Add /usr/local/R to PATH:
    sudo nano /etc/bash.bashrc # then put in:
    PATH=/usr/local/R:$PATH # R installation
12) Reboot

Clearly, some words (of warning) are in order ..., e.g., to use $USER
in 4) instead of <user>, to adapt the right path in 5), to have tools
like tar available or also to maybe choose some other file than
/etc/bash.bashrc for adjusting PATH (see
http://forums.debian.net/viewtopic.php?f=5&t=121169 for why I chose
this file).

I very much like Dirk's message here: "That's your beef" (good word of
warning), but someone who needs to go that way should be able to
follow along the above lines.
... there was a problem for me initially (some kind of
host-resolve-thingy -- can't remember anymore). After googling, I then
found the other key server and it was also suggested to use the actual
key the error message mentions (see step 2)) instead of the fixed
381BA480. I understand too little about the involved risk of changing
that but the above worked for me.

Many cheers (and sorry for the late reply -- it's end-of-term),
Marius
#
Hi Marius,

thanks for your reply.
...
Why not put a link into /usr/local/bin which is already in the path?
Reboot??? It is sufficient to source your bash config file to get the new path.

Kind regards,

Johannes
wrote: