billlee1231
billlee1231

Reputation: 405

Can Not Install XML Package

I can not install the latest XML package V3.9-4. I mannually install it in RGui by typing:

install.packages("LOCALDIR/XML_3.6-0.tar.gz", repos=NULL, type="source")

But get some error message:

* installing *source* package 'XML' ...
Please define LIB_XML (and LIB_ZLIB, LIB_ICONV)
ERROR: configuration failed for package 'XML'
* removing 'LOCALDIR/R/win-library/2.12/XML'
* restoring previous 'LOCALDIR/R/win-library/2.12/XML'

Anyone any idea?

Thx!

Upvotes: 3

Views: 6925

Answers (4)

Paulb
Paulb

Reputation: 1531

I fixed this for myself today, noting it here for prosperity.

On Unbuntu systems, you can fix this by loading libxml2-dev:

sudo apt-get install libxml2-dev

After I did that, install.packages("XML") ran without a hitch.

Upvotes: 6

adam
adam

Reputation: 685

Use the windows binary directly from http://cran.r-project.org/web/packages/XML/index.html

You will go into your R library director and unzip it there.

Upvotes: 0

John S
John S

Reputation: 1

This is a bit of a punt but I had a similar problem some time ago and it was something to do with having another version of iconv.dll (?) available. I think my rogue version came via cygwin. Making that version unavailable fixed the problem.

P.S. I am on Windows and have XML installed. Just from the straight binary.

Upvotes: 0

Tyler Rinker
Tyler Rinker

Reputation: 109864

You're a windows user (at least your path indicates so) and XML is not available for that OS using the standard binary install. So I see you've tried source, smart but there are pieces that can't compile without rtools and some magic voodoo. So you got two choices:

  1. Learn the magic voodoo to make it install correctly
  2. Go to the CRAN site and the read me file, which tells you Professor Ripley has put them together for you here. This is good to know because RCurl is there too. For a direct download of the package click HERE.

I can't help you with the voodoo as I opted for the second choice :)

Upvotes: 4

Related Questions