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

Paul Johnson pauljohn32 at gmail.com
Mon Aug 6 07:06:08 CEST 2012


On Fri, Aug 3, 2012 at 10:16 AM, Chris Evans <chrishold at psyctc.org> wrote:
> I have changed the subject line to reflect a thread split.
>
> Paul Johnson sent the following  at 02/08/12 18:39:
>
> ... much snipped that was continued in my last posting ...
>
>> I'm not an unkind person, I'm not trying to insult you by ignoring
>> the rest of your  message.  Lets fix one thing at a time.
>>
>> As for your complaint that nobody has written out all the details of
>> why things work this way in Debian, well, I suppose you could be the
>> one to write it all out :).  If you get a handle on how this works,
>> you could post a blog explanation and we'd all benefit by being able
>> to refer users to it.  That's how stuff gets done.
>
>
> Agreed.  That way and by google and other search systems picking these
> things up on archives of lists like these.  I'm happy to try to write
> this up as a bloggish thing but one thing I've become very wary of is
> such stuff cluttering up the internet long after the open source package
> in question has moved on.  Nowadays I tend to use the time limited
> searches in Google to restrict things to try to find out if things are
> recent.  I might commit to trying to write an idiots' guide to running R
> on Ubuntu and Debian and using update.packages() to keep
> libraries/packages up to date ... but only if I feel confident that I'll
> find time to keep it current.
>
>>
>> How did I learn about this packaging policy? I'm pretty sure I asked
>> in this list, and was told the information is in the file that is
>> distributed with the Debian package r-base-core,
>> /usr/share/doc/r-base-core/changelog.Debian.gz,
>>
>> * debian/rules: Add R_LIBS setting to /etc/R/Renviron such that
>> user-installed packages will be in /usr/local/lib/R/site-library,
>> Debian packages will install into /usr/lib/R/site-library and the
>> r-base-core and r-recommended packages will use the standard
>> /usr/lib/R/library directory
>>
>>
>> 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.
>
>> 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:
> 1) CRAN: challenging for raw installation but might be best way to do daily
> updates using update.packages() and believing that the majority of packages
> will give error messages explaining why that doesn't work when it doesn't
> (and to be fair, I think that Rgtk2 and rggobi do give such messages, I just
> haven't yet been able to spend time nailing down what I might have to do to
> get them what they want ... or to decided that that's not possible on Ubuntu
> 12.04)
>
> 2) the Debian/Ubuntu repositories that are linked with CRAN mirrors.  In my
> /etc/apt/sources.list these are:
>    deb http://www.stats.bris.ac.uk/R/bin/linux/ubuntu precise/
>    deb-src http://www.stats.bris.ac.uk/R/bin/linux/ubuntu precise/
> These are much more likely than #1 to have all the dependencies already
> dealt with to provide a compiled library so you should (probably) never have
> to update other things in your system to get things working if you go this
> way.  However, they may not update as often as #1 and they may lack a few
> libraries that are in #1 (but if so, it may be because those libraries are a
> real challenge to compile for Debian/Ubuntu?)
>
> 3) Specific Ubuntu ppa repositories which John C Nash makes available at:
>    https://launchpad.net/~marutter/+archive/rrutter
> I'm not really very clearly how this differs markedly from #2 but it sounds
> as if it might update more often.
>
> As I understand it, I would use update.packages() within R (sudo R) to
> update using #1 but #2 and #3 will update using synaptic or the Ubuntu
> package update system.  I am very unclear whether any of these systems is
> supposed to exclude or deprecate using the other.
>
> OK.  Can people help clarify this?
OK, I can feel myself going into long-winded professor mode. After
this, I'm done on this topic.

The answer is "its just a matter of taste." What do you think is
fun/interesting about running Linux and using R?  Did you ever compile
the Linux kernel?  I have. What an adventure.  Can you write programs?
Do you want to learn  how? You'll have to compile programs,
eventually.  But maybe  you aren't interested in that, maybe you just
want to "use" R and the packages other people prepare, in which case a
lot of the OS mumbo-jumbo is off to the side. If there is a Debian
package repository, use it. Your time is better spent at learning to
use Emacs with ESS to develop R code than it is on compiling the R
packages that you will use. I think that's almost certainly true. if
the packages exist on a repository, that is.

If you were an MS Windows user, the chances would be good that you'd
never have to compile an R package because the CRAN has a setup that
builds all packages and makes them available for download on Windows.
If there were only one Linux distribution, I expect they would do it
for Linux as well. It is possible to compile packages for yourself on
Windows.  Duncan Murdoch assembled a large collection of compilers and
other build tools called RTools (see
http://cran.r-project.org/bin/windows). I installed it a few months
ago. It is like a tiny collection of all the best Unix/Linux programs
assembled in a collection for Windows systems. Quite awesome.  I
suppose, if I used Windows, I'd want t o build my own packages, but
I'd only do that so I wouldn't feel so much like I was using Windows.

The Debian "official" repositories (or whatever distribution) can't
possibly stay up to date on 1000s of R packages. They don't even try.
I don't even try anymore.* They provide deb packages for some R
packages, maybe 100s of the most likely ones.  Some programmers try to
help users by providing their own unofficial repositories that include
more or newer Debian packages of R stuff. That's where the PPA
archives come into play.  The PPA thing is a Ubuntu terminology, an
effort to streamline your installation and use of Debian packages that
are not  yet in the official repository..  Those repositories reflect
a tremendous amount of work. If you and I decided "we wish package XYZ
had a Debian version," we could build the package and then host our
own repository.  Since our packages are from Chris and Paul, and not
the official Ubuntu team, they aren't in the distribution, but we
could make them available for people to use.

Should use choose to use the deb packages from whatever repo or should
you compile your own? As I said in the start of this thread, I'd say
to my students, "keep fighting, eventually you will learn about how to
do this and you will be smarter as a result."  A couple of the package
managers have written that I'm encouraging folks like you to waste
your time. They say "just use the deb packages. That is what they are
there for."  I can understand why they feel that way. They went to the
trouble of building it.

I encourage people to learn to compile packages because I think it is
fun.  It is educational. You learn about software development. I was a
"boy scout". Someday, you will want to use an R package for which
nobody has built a distribution-specific package.  So you might as
well be prepared for that day and get comfortable with compiling
things. The Gentoo LInux distribution takes that philosophy to its
logical conclusion, and it tries to make users re-compile every
package on their operating system. Not just R-related packages.
Everything. That's too hardcore for me. The last time I compiled gcc
took almost a full day.  But, if I were stranded on an island with a
computer and the gcc source code, I could eventually build a compiler,
and there's some satisfaction in that.

So find out what you think is fun, and do that :)

pj

* In 2001 or so, the R package repository was small enough that I
could have my lab PC's build every package and stay up to date. By
2003, I noticed that the R package update would start at 5pm and still
be going when I came for work.  After that, I had to drop my "build
everything" commitment and started a list of packages I'll always
install.


>
> Thanks again Paul and John,
>
> Chris
>
>
> --
> Chris Evans <chris at psyctc.org> Skype: chris-psyctc
> Consultant Psychiatrist in Psychotherapy, Notts. PDD network;
> Professor, Psychotherapy, Nottingham University
> *If I am writing from one of those roles, it will be clear. Otherwise*
> *my views are my own and not representative of those institutions    *
> If you have difficulty Emailing me on this address or getting a reply,
> send again but cc to:       chris dot evans at nottshc dot nhs dot uk
> and to:                     c dot evans at nottingham dot ac dot uk
>
> _______________________________________________
> R-SIG-Debian mailing list
> R-SIG-Debian at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-debian



-- 
Paul E. Johnson
Professor, Political Science    Assoc. Director
1541 Lilac Lane, Room 504     Center for Research Methods
University of Kansas               University of Kansas
http://pj.freefaculty.org            http://quant.ku.edu



More information about the R-SIG-Debian mailing list