brew install libxml2 Updating Homebrew... ==> Auto-updated Homebrew! Updated 1 tap (homebrew/core). ==> Updated Formulae Updated 19 formulae. Warning: libxml2 2.9.10_2 is already installed and up-to-date To reinstall 2.9.10_2, run `brew reinstall libxml2` #### # PATH PATH="/usr/local/Cellar/libxml2/2.9.10_2/bin:$PATH" export PATH #### cpanm XML::LibXML --> Working on XML::LibXML Fetching http://www.cpan.org/authors/id/S/SH/SHLOMIF/XML-LibXML-2.0206.tar.gz ... OK Configuring XML-LibXML-2.0206 ... OK Building and testing XML-LibXML-2.0206 ... FAIL ! Installing XML::LibXML failed. See /Users/root/.cpanm/work/1607108755.33137/build.log for details. Retry with --force to force install it. #### Can't load '/Users/root/.cpanm/work/1607108755.33137/XML-LibXML-2.0206/blib/arch/auto/XML/LibXML/LibXML.bundle' for module XML::LibXML: dlopen(/Users/root/.cpanm/work/1607108755.33137/XML-LibXML-2.0206/blib/arch/auto/XML/LibXML/LibXML.bundle, 2): Symbol not found: _xmlFree Referenced from: /Users/root/.cpanm/work/1607108755.33137/XML-LibXML-2.0206/blib/arch/auto/XML/LibXML/LibXML.bundle Expected in: flat namespace in /Users/root/.cpanm/work/1607108755.33137/XML-LibXML-2.0206/blib/arch/auto/XML/LibXML/LibXML.bundle at /Users/root/perl5/perlbrew/perls/perl-5.28.2/lib/5.28.2/darwin-2level/DynaLoader.pm line 197. � at /Users/root/.cpanm/work/1607108755.33137/XML-LibXML-2.0206/blib/lib/XML/LibXML.pm line 156. BEGIN failed--compilation aborted at /Users/root/.cpanm/work/1607108755.33137/XML-LibXML-2.0206/blib/lib/XML/LibXML.pm line 156. Compilation failed in require at t/01basic.t line 6. BEGIN failed--compilation aborted at t/01basic.t line 6. # Looks like your test exited with 2 before it could output anything. t/01basic.t ........................................ Dubious, test returned 2 (wstat 512, 0x200) Failed 3/3 subtests Can't load '/Users/root/.cpanm/work/1607108755.33137/XML-LibXML-2.0206/blib/arch/auto/XML/LibXML/LibXML.bundle' for module XML::LibXML: dlopen(/Users/root/.cpanm/work/1607108755.33137/XML-LibXML-2.0206/blib/arch/auto/XML/LibXML/LibXML.bundle, 2): Symbol not found: _xmlFree Referenced from: /Users/root/.cpanm/work/1607108755.33137/XML-LibXML-2.0206/blib/arch/auto/XML/LibXML/LibXML.bundle Expected in: flat namespace in /Users/root/.cpanm/work/1607108755.33137/XML-LibXML-2.0206/blib/arch/auto/XML/LibXML/LibXML.bundle at /Users/root/perl5/perlbrew/perls/perl-5.28.2/lib/5.28.2/darwin-2level/DynaLoader.pm line 197. � at /Users/root/.cpanm/work/1607108755.33137/XML-LibXML-2.0206/blib/lib/XML/LibXML.pm line 156. BEGIN failed--compilation aborted at /Users/root/.cpanm/work/1607108755.33137/XML-LibXML-2.0206/blib/lib/XML/LibXML.pm line 156. Compilation failed in require at /Users/root/.cpanm/work/1607108755.33137/XML-LibXML-2.0206/blib/lib/XML/LibXML/Common.pm line 29. BEGIN failed--compilation aborted at /Users/root/.cpanm/work/1607108755.33137/XML-LibXML-2.0206/blib/lib/XML/LibXML/Common.pm line 29. Compilation failed in require at t/02parse.t line 20. BEGIN failed--compilation aborted at t/02parse.t line 20. # Looks like your test exited with 2 before it could output anything. t/02parse.t ........................................ Dubious, test returned 2 (wstat 512, 0x200) Failed 533/533 subtests