Skip to content


[R] How to fix package installation failure on “checking for xml2-config”

I’ve recently had to set up a secondary computation server running R-project. Unfortunately, like all my servers, it runs under Linux, and R is a PITA to run under Linux. Notably, packages must be compiled on the machine: not only this is long, but also it requires tons of programming-related dependencies (GCC and such), and, well, it tends to fail sometimes.

While I’m at it, here are the repositories to be added to /etc/apt/sources.list in Debian 7:

deb http://mirrors.softliste.de/cran/bin/linux/debian wheezy-cran3/
deb-src http://mirrors.softliste.de/cran/bin/linux/debian wheezy-cran3/

So, I wanted to install a few packages from Bioconductor, notably the “GOSim” package. But installation failed on the “XML” package dependency (yes, it’s a package named “XML”), with the following apparent issues:
checking for pkg-config... no
checking for xml2-config... no

So apparently, some dependencies were missing despite that infamous package manager system which I seem to be the only one to hate. The first dependency was trivial to fix:
apt-get install pkg-config
But for the second one, that trick didn’t work.

I eventually found on some Stackoverflow page that the relevant package is libxml2-dev, so:
apt-get install libxml2-dev

And that’s it, you should now be able to install your package… or move to the next missing dependency :-p

Posted in R (R-project).


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.

Sorry about the CAPTCHA that requires JS. If you really don't want to enable JS and still want to comment, you can send me your comment via e-mail and I'll post it for you.

Please solve the CAPTCHA below in order to fight spamWordPress CAPTCHA