[R] problem configuring package udunits

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon May 12 08:26:20 CEST 2008


Please ask the maintainer.  The 'udunits' R package seems to require its 
libraries in particular places.  Note that it is looking for 
/usr/lib/libudunits.a, that is a static library in a 32-bit library 
directory, whereas you most likely have /usr/lib64/libudunits.so or 
/usr/lib64/libudunits.a  (This only works for me because I have both 32- 
and 64-bit versions of udunits installed.)

However, that is if you have udunits installed, since 
/usr/include/udunits.h is missing.  You do need both the udunits and 
udunits-dev packages installed.

On Sun, 11 May 2008, Bradley Christoffersen wrote:

>
> Hi R Users,
>
> I am new to running R on a Linux platform (I'm used to Windows)

On Windows someone else struggled with this badly designed package for 
you.

> - I'm running R
> 2.7.0 on Ubuntu 7.10 (Gutsy) as sudo (without Emacs).  My architecture is
> Pentium D (x86_64).
>
> I am having problems successsfully configuring the downloaded package 
> 'udunits'. When I execute
>
>>  install.packages("udunits", lib="/usr/local/lib/R/library")
>
> I get the following result:
>
>
> trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/udunits_1.3.tar.gz'
> Content type 'application/x-gzip' length 29985 bytes (29 Kb)
> opened URL
> ==================================================
> downloaded 29 Kb
>
> * Installing *source* package 'udunits' ...
> creating cache ./config.cache
> checking how to run the C preprocessor... gcc -std=gnu99 -E
> checking for gcc... gcc -std=gnu99
> checking whether the C compiler (gcc -std=gnu99 -g -O2 ) works... yes
> checking whether the C compiler (gcc -std=gnu99 -g -O2 ) is a cross-compiler...
> no
> checking whether we are using GNU C... yes
> checking whether gcc -std=gnu99 accepts -g... yes
> checking for /usr/local/include/udunits.h... no
> checking for /usr/include/udunits.h... no
> checking for /home/saleskalab/include/udunits.h... no
> checking for /usr/local/lib/libudunits.a... no
> checking for /usr/lib/libudunits.a... no
> checking for /lib/libudunits.a... no
> checking for /home/saleskalab/lib/libudunits.a... no
> ***********************************************************************************
> ***********************************************************************************
> NOTE: udunits package not found!  Either install it in a standard place (/usr or
> /usr/local), or edit the file udunits_1.0/udunits/src/Makevars.in and put in the
> location where the package is installed.
> ***********************************************************************************
> ***********************************************************************************
> exit: 1162: Illegal number: -1
> ERROR: configuration failed for package 'udunits'
> ** Removing '/usr/local/lib/R/library/udunits'
>
> The downloaded packages are in
>        /tmp/RtmpmhqM2D/downloaded_packages
> Updating HTML index of packages in '.Library'
> Warning message:
> In install.packages("udunits", lib = "/usr/local/lib/R/library") :
>  installation of package 'udunits' had non-zero exit status
>
>
> I have tried downloading the package manually and running ./configure, but with
> the same result.  As the error message suggested, I looked at the file
> udunits_1.0/udunits/src/Makevars.in, (contents below), but am not sure what to
> modify.
>
> ##PKG_CPPFLAGS=-I/path/to/udunits/header
> ##PKG_LIBS=-L/path/to/udunits/lib -ludunits
>
> PKG_LIBS=-L at UDUNITS_LIBDIR@ -l at UDUNITS_LIBNAME@
> PKG_CPPFLAGS=-I at UDUNITS_INCDIR@
>
>
> [[elided Hotmail spam]]
> Brad
> _________________________________________________________________
> Get Free (PRODUCT) RED™  Emoticons, Winks and Display Pics.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


More information about the R-help mailing list