Skip to content
Prev 373524 / 398500 Next

Problem installing libxml2 under Homebrew

You probably have a malconfigured homebrew installation of R. On MacOS
it is recommended to use the CRAN version of R
https://cran.r-project.org/bin/macosx/. The homebrew version depends
on gcc compilers and does not support cran binary packages.

If you really want to use the homebrew R try ruling out the following problems:

 - Check for conflicting compilers in your path (gcc, ccache, clang4).
Unless you have good reasons not to, you should use the native xcode
compilers to build R packages.
 - Comment out custom compilers/flags that you may have in your
~/.R/Makevars file.

Use the following script to check why the configuration is failing:

  CPP=$(R CMD config CPP)
  CFLAGS=$(xml2-config --cflags)
  echo '#include <libxml/tree.h>' | $CPP $CFLAGS -E -xc - > /dev/null




On Sat, Feb 17, 2018 at 8:53 AM, Peter Meilstrup
<peter.meilstrup at gmail.com> wrote: