Devtools in R Installation

Hi,

So I am recently trying to instal ‘devtools’ in R to access an old package from cran which is no longer updated. I get an error saying:

Configuration failed because libxml-2.0 was not found. Try installing:
 * deb: libxml2-dev (Debian, Ubuntu, etc)
 * rpm: libxml2-devel (Fedora, CentOS, RHEL)
 * csw: libxml2_dev (Solaris)
If libxml-2.0 is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libxml-2.0.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'

I’m sure libxml2 is already installed but the path is wrong. Any idea how to reset the path, or put the packages in my own section so R knows where to locate them? I tried installing via

brew install libxml2

but I don’t think I have access to do this.

See these package install notes: R package installation guide

Oh my bad I did not realise! Is there an installation which covers most? Looking at this thread it all seems pretty variable?

Yeah, it’s kinda variable. Depends on the system dependencies needed and how the package author(s) set up the configuration.