[R-sig-Debian] Debian Testing: ~/.Renviron seems to not being read (R_LIBS not set)
Marius Hofert
marius.hofert at uwaterloo.ca
Tue Mar 31 02:42:47 CEST 2015
Dear Dirk, Dear Johannes,
Thanks for helping, I could solve the problem.
By reading your posts, I got a bit of the impression that questions
beyond the 'standard installation' process are not really welcome on
R-SIG-Debian. If this is the case, I'm sorry for my post. I wasn't
aware of this, but Dirk makes it clear why on
https://stat.ethz.ch/pipermail/r-sig-debian/2013-March/002062.html.
As Dirk also mentioned on
http://stackoverflow.com/questions/8343686/how-to-install-2-different-r-versions-on-debian
installing from source is the only practical way in case one needs
several R versions. I now went back to Chapter 2 of
http://cran.r-project.org/doc/manuals/r-release/R-admin.html to read
more about it and to see whether I have done something substantially
wrong. This seemed not to be the case.
Next, Dirk's wonderful little example helped... I could check that
.Renviron is indeed found. Then it was easy: my local
version-independent library was not found simply because .libPaths()
only contains those folders which physically exist (also mentioned on
?.libPaths). And indeed, I had not checked that.
Here is thus the final solution that worked (in case useful for others
or being improved upon [slightly expanded in comparison to the
original one, e.g., also addressing how to obtain a key -- the server
is different than keys.gnupg.net mentioned on CRAN.]):
1) sudo emacs /etc/apt/sources.list # then add: deb
http://stat.ethz.ch/CRAN/bin/linux/debian jessie-cran3/ deb-src
http://stat.ethz.ch/CRAN/bin/linux/debian jessie-cran3/ # => then run sudo
apt-get update. It fails due to a missing key => note the missing key number
# and use sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key
<NUMBER> where # <NUMBER> = number of the missing public key
2) sudo apt-get build-dep r-base
3) sudo mkdir /usr/local/R sudo chown mhofert:mhofert /usr/local/R
cd /usr/local/R # if old versions exist (./R-devel, ./R-devel-build,
./R-devel.tar.gz etc.), # delete them first, then do: wget
http://cran.r-project.org/src/base/R-3/R-3.1.3.tar.gz tar -xzf R-3.1.3.tar.gz
mv R-3.1.3 R-3.1.3-source
mkdir R-3.1.3-build cd R-3.1.3-build ../R-3.1.3-source/configure # we do
./configure *outside* the source directory (=> keep sources)
make make check make pdf make info
cd .. ln -s /usr/local/R/R-3.1.3-build/bin/R /usr/local/R/R
mkdir /usr/local/R/library # create version-independent library
sudo emacs ~/etc/bash.bashrc # then add: PATH=/usr/local/R:$PATH
4) ~/.Renviron should contain R_LIBS=/usr/local/R/library
Thanks & cheers,
Marius
On Mon, Mar 30, 2015 at 1:09 PM, Dirk Eddelbuettel <edd at debian.org> wrote:
>
> Marius,
>
> On 30 March 2015 at 12:30, Marius Hofert wrote:
> | Here is how I installed R. This is basically how Martin Maechler
> | showed me to install R under Ubuntu (in several versions so that they
> | are also recognized by ESS). My goal is to adjust this to make it work
> | for Debian:
>
> That's your beef. We support reasonably feature complete packages built in
> reasonably well-engineered and by now mostly debugged processes.
>
> You can of course build your own, but if you do and things break you get to
> keep those pieces.
>
> And how to build R(-devel) locally has been discussed in the past.
>
> Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
More information about the R-SIG-Debian
mailing list