[R-sig-Debian] Problem updating packages in 2.15.1 on Ubuntu 12.04: updating options

Michael Rutter mar36 at psu.edu
Sun Aug 5 21:58:41 CEST 2012



On 08/03/2012 11:16 AM, Chris Evans wrote:

-- Lines deleted --

>> I know for sure from previous debates here that the Debian packagers
>> expect you to use the packages they provide, and they don't think
>> "ordinary" users should bother trying to compile packages.
>
> OK.  Is that true packagers?  I've had that impression at times but at
> other times it has also seemed that the packaging is designed to sit
> alongside the CRAN repositories simply making it much easier to get the
> bases of a minimal or a really nearly complete R system easily through
> the Debian or Ubuntu upgrade systems. However, when I find I'm reading
> things that way I find myself believing that update.packages() ought to
> remain a non-deprecated option.

I have been at the Joint Statistical Meetings/family vacation, so I am 
finally catching up on this thread and will comment on a couple of things.

I can't speak for Dirk on the Debian side, but the statement "they don't 
think 'ordinary' users should bother trying to compile packages." in 
regards to Ubuntu is absurd in my opinion.  First of all, we supply the 
package r-base-dev, whose description includes "This package ensures 
that other Debian packages needed for installation of some auxiliary R 
packages are installed."  There are ~4000 packages in CRAN, plus others 
on BIOC, Rforge, and other places.  We cannot provide Ubuntu specific 
.debs for all of those packages, so we supply the tools to install them 
from within R.  I assume that anyone that uses R on a regular basis will 
at some point use install.packages from within R due to the fact we 
cannot supply everything as a .deb.

Unfortunately, not all packages build easily within R due to specific, 
non-R libraries that are required.  Sometimes the Ubuntu packages that 
supply those libraries are already installed and the user will never 
know that they were needed, other times a user will need to sort through 
the output of "install.packages" to see what is missing and find the 
required Ubuntu package that will satisfy the dependency.  Ubuntu 
package search (http://packages.ubuntu.com/), Google, and this mailing 
list are excellent resources to help determine what packages is needed.

R based packages (r-base, r-cran-*, and r-bioc-*) are provided for two 
reasons, in my opinion.  One is to make installation easy for end users 
of R using Ubuntu.  By installing r-base, there is no need to worry 
about what compilers, latex engines, libraries, and all the other parts 
that are needed to compile R.  Same goes for r-cran and r-bioc packages. 
The other reason is that we provide updates to users as part of the 
regular updating Ubuntu process.  Not only are users provided with up to 
date versions of R and certain R packages without needing to follow a 
number of mailing lists, the packages have all the Ubuntu specific 
bugs/issues worked out, if there are any.  You don't have to download 
the source and compile Firefox every time Firefox is updated, so why 
should you have to do that for R?

We also design the R packages to work in a specific way.  So, if you 
install R in the default location and either install the available R deb 
packages with apt/synaptic, or install from within R with 
'install.packages' in the default locations, R *should* work without 
issue.  If it doesn't and the issue can be repeated on a default 
installation, Dirk and I will work to resolve those issues.  If you 
decide to install things in different locations, then we can't guarantee 
that things will always work they way they are supposed to (it also 
become harder to suggest solutions, since we can't recreate the 
problem).  I never have a problem with package locations if I use 
apt/synaptic to install what is available in Ubuntu and 'sudo R' to 
install and update packages from within R, all using the default 
settings.  I always make sure my Ubuntu system is current before I 
update.packages within R, and I have never had an issue with an 
apt/synaptic installed package being updated from within R via 
"update.packages" and not working.

A hint:  Either always install and update packages using R as root (via 
sudo) or install and update packages using user (non-sudo) privileges. 
If you install package via sudo (using install.packages or 
apt/synaptic), update.packages under normal user privileges will not 
allow the update to occur.

It should be pointed out that we assume that the R user has access to 
sudo to install Ubuntu packages via .deb pacakges.  If you do not, than 
you need to work things out with your IT people how to best handle the 
installation and updating of R.

>> That does not speak to the fact that you may not have access to an
>> up-to-date repository for packages for your particular system.  John
>> Nash pointed you at one that will work for you.
>
> OK.  Let's see if I've got this right or wrong.  I think there are three
> repositories that a Ubuntu system can use to update R:

Here is a link to some information of the available R repositories for 
Ubuntu:

http://www.personal.psu.edu/mar36/blogs/the_ubuntu_r_blog/installing-r.html

In addition, if you would like access to more than 1100 other R packages 
for Ubuntu, you can use my c2d4u PPA on launchpad.  More details here:

http://www.personal.psu.edu/mar36/blogs/the_ubuntu_r_blog/cran2deb4ubuntu.html

I see two main issues with using R on Ubuntu currently.

1. Documentation.  I need to document things better.  To help with this, 
I have created "The Ubuntu R Blog".  I need to start feeding content to 
R-bloggers and adding more documentation.  It can be found here:

http://tiny.cc/ubunturblog or
http://www.personal.psu.edu/mar36/blogs/the_ubuntu_r_blog/cran2deb4ubuntu.html

2. install.packages("foo") needs to check to see if the package is 
available in an Ubuntu repository and use that instead of building from 
CRAN.  I have had a couple of people from UseR conferences suggest some 
solutions to this, and I need to sit down and create an Ubuntu specific 
R package to solve this problem.  I will keep you posted on this.

Michael
-- 
Dr. Michael A. Rutter
School of Science
Penn State Erie, The Behrend College
4205 College Drive
Erie, PA 16563
http://math.bd.psu.edu/faculty/rutter
mar36 at psu.edu



More information about the R-SIG-Debian mailing list