[R-sig-Debian] Cannot install XML package with R 3.0 and Ubuntu 12.04

Dirk Eddelbuettel edd at debian.org
Sat Jun 15 21:09:36 CEST 2013


Hi John, 

On 15 June 2013 at 13:18, John Blischak wrote:
|     | I am unable to install the R package XML using R 3.0.1 on Ubuntu 12.04
|     LTS
|     | (64-bit). After the installation failed using install.packages, I
|     followed
| 
|     You did not detail this sufficiently, but installation from _source_
|     presumably failed because you did not have all the build-dependencies.
| 
|     In this case where are pre-build _binary_ exists, you can use the
|     metainformation for the _binary_ package to build the _source_ package:
| 
|         sudo apt-get build-dep r-cran-xml
| 
| 
| I apologize for not providing sufficient details. I am new to Ubuntu. Could you
| please elaborate on how I could have obtained the information on the
| build-dependencies that would have been helpful for diagnosing the problem? 

You didn't copy and paste your build errors.  Typically, these show
'configure' failing to find a header file, say, xml.h, which, once you know,
gives away the issue.   At that point you can often infer that

      if foo.h is missing

      and libfoo is installed

      you may need libfoo-dev to provide the header

This mostly holds, but it sometimes obscured by adding major release numbers
to libraries etc.

The 'getting Ubuntu to give you build-deps' trick is both a bit more advanced
and particular to the situation where a binary (here: r-cran-xml) exists (but
was unuseable for the R 2.15.* vs R 3.0.* issue).

| This was exactly the issue. Michael added the XML package to his PPA and then I
| was able to install it with sudo apt-get install r-cran-xml.

Yep.  These repos are usually pretty reliable.

Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com



More information about the R-SIG-Debian mailing list