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.