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

Chris Evans chrishold at psyctc.org
Thu Aug 2 11:55:42 CEST 2012


Paul Johnson sent the following  at 01/08/12 16:01:
> On Wed, Aug 1, 2012 at 1:02 AM, Chris Evans <chrishold at psyctc.org>
> wrote:
>> The specific message is: "Warning: package 'spatial' in library
>> '/usr/lib/R/library' will not be updated"
>>
>> and the number of libraries about which that's the complaint is now
>> increasingly almost daily so clearly something is wrong.
>>
> Yes, the something wrong is the system administrator :)

Sweet of you to confirm what I myself said ("Clearly I don't understand
something and am doing something wrong.  Please can someone enlighten
me?")  However, I am only as good as the information I can find and I
honestly don't think that's very clear but let's move on from that bit
of who's the wrong one.

> Please remember that you have a choice of installing R packages from
>  the R repositories using install.packages (or update.packages). That
>  downloads source code, compiles and installs. Generally, on Debian,
> it will install to /usr/local/lib/R/site-library.  But you may also
> install them as Debian packages that have been built on somebody
> else's system and wrapped up for your usage.  Those generally install
> into /usr/lib/R/site-library.

Are these mutually exclusive ways of doing things?  If so, I think we
should have a much clearer statement to that effect somewhere.  If not,
and I had assumed they were not, it would be useful to be told why the
two different library locations are used and how R handles things when
it may find copies of the same library in different library locations.

> As you know, R is provided with a set of recommended packages, and
> when you install r-base-core, it brings with it those recommended
> packages, which have names like:
>
> r-cran-boot r-cran-cairodevice
>
> Since you don't give the full output of update.packages(), I can only
> guess what is going wrong.  But I'm almost certain this is it.

I didn't withhold anything that looked remotely informative, certainly
there are no complaints about the spatial, simply that comment that it
won't be updated (as for many other packages).  I have put the full
output at the end of this Email.  You will see that the messages that
many packages won't be updated come before the two failed updates which
clearly are about other things not being available (which I will explore
some time but don't worry me now as I'm not currently using either
package much if at all (as far as I know!)

> You have the R spatial package installed from a debian package:
>
> Check the spatial package like so:
>
> $ dpkg -l | grep spatial ii  r-cran-spatial 7.3-3-1 GNU R package for
> spatial statistics
>
> $ dpkg -L r-cran-spatial
>
> Now, if you are inside R and you run
>
> $ install.packages("spatial", dep=T)
>
> or
>
> $ update.packages()
>
> your system notices you already have a copy of spatial in
> /usr/lib/site-library (from the deb package).  But you told your R to
> download and compile the new version, and do it "the R way". However,
> your system does not have all of the tools (compilers and shared
> libraries) required to build the package.  If we could see the full
> output from your failed effort, I believe that would be obvious.

No, it really isn't there are no comments like that at all before that
line and the only complaints like that are in relation to other packages

> So, either you need to get the right repository specified in
> /etc/apt/sources.list.d so that you can update the R packages with a
>  Debian package manager (such as apt-get or synaptic), or you need to
>  install a lot of compilers and other tools need to build your own
> packages.

I am happy to do either but I thought that having:
deb http://www.stats.bris.ac.uk/R/bin/linux/ubuntu precise/
in my sources.list was enough to achieve the former.  Can you correct me
there?  What else should I have in /etc/apt/sources.list?  I have now
added Jonn Nash's rrutter ppa but I don't think that removes my problems.

> Or do both, and then have competing versions of the spatial library
> on your system.

I can see that's what happens but my impression has been that there are
packages that are not in the pre-packaged libraries and that the "raw
packages" might update more often, if so, I'd rather go that way and I
had assumed I could have the "best of both worlds" but, as you're
saying, it does appear that R doesn't handle "competing" packages very
well.  I had assumed that it would compare version numbers of
"competing" packages and update only if the cran repository had a more
recent version than those aboard the local machine and surely it would
be best if it then deleted (subject to having access permission)
outdated packages after successful updating.  I can see that this isn't
an issue specific to R-sig-Debian though.

> That can make research very exciting! Its like Forest Gump said,
> "life is like a box of chocolates. You never know what you'll get."

Not sure I get the joke here.  (Never seen Forest Gump but I get the 
feeling that you're suggesting that's a rather naive and stupid thing to 
hope to be able to do.)

>> I'm working on a laptop on which I do the recommended Ubuntu
>> updates daily. I done a standard installation of R 2.15.1 using
>> synaptic with:
>>
>> 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/
>>
>> in /etc/apt/sources.list and I added most of the optional packages
>> that are packaged at that source.
>>
>> I have been updating going into R through "sudo R" in my home
>> directory and then using
>> "update.packages(instlib=.libPaths()[1],ask=FALSE)"
>>
>> However, that gets these complaints about not updating.  I get the
>> same message if I use: "update.packages(ask=FALSE)"
>>
>> I get the same if I use "su" rather than sudo and if I update as
>> an ordinary user and if I point to a different mirror repository
>> (I have been using Switzerland as Bristol seemed to be lagging
>> behind Switzerland a lot).
>>
> A result of the fact you lack the development tools required to
> compile the R packages.

I really don't think that's the case.  I have read through
http://probability.ca/cran/bin/linux/ubuntu/
and I have r-base-dev installed and no obvious messages about missing 
support functions other than for ggboi and Rgtk2.

OK.  Only further addition below is the full output from the 
update.packages(ask=FALSE) run with sudo R.

I'm interested to hear what more people can tell me.

Very best all,

Chris


>
>> I was doing to that without a personal library but tried updating
>> as an ordinary user and created a personal library as prompted but
>> that still gets the same but that means that my .libPaths() is
>> now:
>>
>>> .libPaths()
>> [1] "/home/chris/R/i686-pc-linux-gnu-library/2.15" [2]
>> "/usr/local/lib/R/site-library" [3] "/usr/lib/R/site-library" [4]
>> "/usr/lib/R/library"
>>
>> I think I've read and understood umpteen questions about the
>> different ways of updating libraries on this list.  I would like
>> to update to the latest library versions regularly (as 2.15.1 for
>> Windoze in a VM box on this machine does fine).  Clearly I don't
>> understand something and am doing something wrong.  Please can
>> someone enlighten me?
>>
>> Thanks in advance,
>>
>> Chris


Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[Previously saved workspace restored]

> update.packages(ask=FALSE)
--- Please select a CRAN mirror for use in this session ---
Loading Tcl/Tk interface ... done
Warning: package 'Amelia' in library '/usr/lib/R/site-library' will not
be updated
Warning: package 'bayesm' in library '/usr/lib/R/site-library' will not
be updated
Warning: package 'car' in library '/usr/lib/R/site-library' will not be
updated
Warning: package 'caTools' in library '/usr/lib/R/site-library' will not
be updated
Warning: package 'coda' in library '/usr/lib/R/site-library' will not be
updated
Warning: package 'colorspace' in library '/usr/lib/R/site-library' will
not be updated
Warning: package 'doMC' in library '/usr/lib/R/site-library' will not be
updated
Warning: package 'doSNOW' in library '/usr/lib/R/site-library' will not
be updated
Warning: package 'eco' in library '/usr/lib/R/site-library' will not be
updated
Warning: package 'effects' in library '/usr/lib/R/site-library' will not
be updated
Warning: package 'Epi' in library '/usr/lib/R/site-library' will not be
updated
Warning: package 'epicalc' in library '/usr/lib/R/site-library' will not
be updated
Warning: package 'epiR' in library '/usr/lib/R/site-library' will not be
updated
Warning: package 'eRm' in library '/usr/lib/R/site-library' will not be
updated
Warning: package 'evd' in library '/usr/lib/R/site-library' will not be
updated
Warning: package 'foreach' in library '/usr/lib/R/site-library' will not
be updated
Warning: package 'gdata' in library '/usr/lib/R/site-library' will not
be updated
Warning: package 'gmodels' in library '/usr/lib/R/site-library' will not
be updated
Warning: package 'gplots' in library '/usr/lib/R/site-library' will not
be updated
Warning: package 'gtools' in library '/usr/lib/R/site-library' will not
be updated
Warning: package 'Hmisc' in library '/usr/lib/R/site-library' will not
be updated
Warning: package 'iterators' in library '/usr/lib/R/site-library' will
not be updated
Warning: package 'lme4' in library '/usr/lib/R/site-library' will not be
updated
Warning: package 'lmtest' in library '/usr/lib/R/site-library' will not
be updated
Warning: package 'mapdata' in library '/usr/lib/R/site-library' will not
be updated
Warning: package 'maps' in library '/usr/lib/R/site-library' will not be
updated
Warning: package 'maptools' in library '/usr/lib/R/site-library' will
not be updated
Warning: package 'MatchIt' in library '/usr/lib/R/site-library' will not
be updated
Warning: package 'MCMCpack' in library '/usr/lib/R/site-library' will
not be updated
Warning: package 'medAdherence' in library '/usr/lib/R/site-library'
will not be updated
Warning: package 'misc3d' in library '/usr/lib/R/site-library' will not
be updated
Warning: package 'mnormt' in library '/usr/lib/R/site-library' will not
be updated
Warning: package 'MNP' in library '/usr/lib/R/site-library' will not be
updated
Warning: package 'msm' in library '/usr/lib/R/site-library' will not be
updated
Warning: package 'multcomp' in library '/usr/lib/R/site-library' will
not be updated
Warning: package 'mvtnorm' in library '/usr/lib/R/site-library' will not
be updated
Warning: package 'plotrix' in library '/usr/lib/R/site-library' will not
be updated
Warning: package 'psy' in library '/usr/lib/R/site-library' will not be
updated
Warning: package 'randomForest' in library '/usr/lib/R/site-library'
will not be updated
Warning: package 'RaschSampler' in library '/usr/lib/R/site-library'
will not be updated
Warning: package 'Rcmdr' in library '/usr/lib/R/site-library' will not
be updated
Warning: package 'rgl' in library '/usr/lib/R/site-library' will not be
updated
Warning: package 'rms' in library '/usr/lib/R/site-library' will not be
updated
Warning: package 'robustbase' in library '/usr/lib/R/site-library' will
not be updated
Warning: package 'sandwich' in library '/usr/lib/R/site-library' will
not be updated
Warning: package 'scatterplot3d' in library '/usr/lib/R/site-library'
will not be updated
Warning: package 'slam' in library '/usr/lib/R/site-library' will not be
updated
Warning: package 'snow' in library '/usr/lib/R/site-library' will not be
updated
Warning: package 'sp' in library '/usr/lib/R/site-library' will not be
updated
Warning: package 'stabledist' in library '/usr/lib/R/site-library' will
not be updated
Warning: package 'strucchange' in library '/usr/lib/R/site-library' will
not be updated
Warning: package 'surveillance' in library '/usr/lib/R/site-library'
will not be updated
Warning: package 'TeachingDemos' in library '/usr/lib/R/site-library'
will not be updated
Warning: package 'timeDate' in library '/usr/lib/R/site-library' will
not be updated
Warning: package 'timeSeries' in library '/usr/lib/R/site-library' will
not be updated
Warning: package 'tseries' in library '/usr/lib/R/site-library' will not
be updated
Warning: package 'vcd' in library '/usr/lib/R/site-library' will not be
updated
Warning: package 'VGAM' in library '/usr/lib/R/site-library' will not be
updated
Warning: package 'XML' in library '/usr/lib/R/site-library' will not be
updated
Warning: package 'xtable' in library '/usr/lib/R/site-library' will not
be updated
Warning: package 'Zelig' in library '/usr/lib/R/site-library' will not
be updated
Warning: package 'zoo' in library '/usr/lib/R/site-library' will not be
updated
Warning: package 'class' in library '/usr/lib/R/library' will not be updated
Warning: package 'MASS' in library '/usr/lib/R/library' will not be updated
Warning: package 'nnet' in library '/usr/lib/R/library' will not be updated
Warning: package 'spatial' in library '/usr/lib/R/library' will not be
updated
trying URL 'http://stat.ethz.ch/CRAN/src/contrib/rggobi_2.1.19.tar.gz'
Content type 'application/x-gzip' length 145669 bytes (142 Kb)
opened URL
==================================================
downloaded 142 Kb

trying URL 'http://stat.ethz.ch/CRAN/src/contrib/RGtk2_2.20.24.tar.gz'
Content type 'application/x-gzip' length 2784958 bytes (2.7 Mb)
opened URL
==================================================
downloaded 2.7 Mb

* installing *source* package ‘RGtk2’ ...
** package ‘RGtk2’ successfully unpacked and MD5 sums checked
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for INTROSPECTION... no
checking for GTK... no
configure: error: GTK version 2.8.0 required
ERROR: configuration failed for package ‘RGtk2’
* removing ‘/usr/lib/R/site-library/RGtk2’
* restoring previous ‘/usr/lib/R/site-library/RGtk2’
* installing *source* package ‘rggobi’ ...
** package ‘rggobi’ successfully unpacked and MD5 sums checked
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GGOBI... no
configure: error: Package requirements (ggobi >= 2.1.6) were not met:

Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gtk+-2.0', required by 'libggobi', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GGOBI_CFLAGS
and GGOBI_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
ERROR: configuration failed for package ‘rggobi’
* removing ‘/usr/lib/R/site-library/rggobi’
* restoring previous ‘/usr/lib/R/site-library/rggobi’

The downloaded source packages are in
	‘/tmp/RtmpHLL6ka/downloaded_packages’
Warning messages:
1: In install.packages(update[instlib == l, "Package"], l, contriburl =
contriburl,  :
   installation of package ‘RGtk2’ had non-zero exit status
2: In install.packages(update[instlib == l, "Package"], l, contriburl =
contriburl,  :
   installation of package ‘rggobi’ had non-zero exit status
>



-- 
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



More information about the R-SIG-Debian mailing list