gpt4 book ai didi

xml - cpan 无法在 macOS Catalina 上安装 XML::LibXML

转载 作者:行者123 更新时间:2023-12-04 12:24:39 27 4
gpt4 key购买 nike

我正在使用 cpan install XML::LibXML尝试安装 XML::LibXML解析器,但它不会通过。它给出了以下错误:

cc -c   -I/usr/include/libxml2  -fno-common -DPERL_DARWIN -mmacosx-version-min=10.14 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_PUTENV -O3   -DVERSION=\"2.0201\" -DXS_VERSION=\"2.0201\"  "-I/usr/local/Cellar/perl/5.28.1/lib/perl5/5.28.1/darwin-thread-multi-2level/CORE"  -DHAVE_UTF8 Devel.c
In file included from Devel.xs:28:
/usr/local/include/libxml/xmlmemory.h:16:10: fatal error: 'libxml/xmlversion.h'
file not found
#include <libxml/xmlversion.h>
^~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [Devel.o] Error 1
SHLOMIF/XML-LibXML-2.0201.tar.gz
/usr/bin/make -- NOT OK

更新:
在我手动将“开发”文件复制到 /usr/local/include/libxml 之后, file not found现在错误消失了,但仍然无法编译 XML-LibXML .

这是输出信息:
output info

更详细的信息:
Loading internal logger. Log::Log4perl recommended for better logging
Reading '/Users/chris/.cpan/Metadata'
Database was generated on Fri, 05 Jul 2019 03:56:00 GMT
Running install for module 'XML::LibXML'
CPAN: Digest::SHA loaded ok (v6.01)
CPAN: Compress::Zlib loaded ok (v2.074)
Checksum for /Users/chris/.cpan/sources/authors/id/S/SH/SHLOMIF/XML-LibXML-2.0201.tar.gz ok
CPAN: YAML loaded ok (v1.29)
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20181129_28)
Configuring S/SH/SHLOMIF/XML-LibXML-2.0201.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for XML::LibXML
Writing MYMETA.yml and MYMETA.json
SHLOMIF/XML-LibXML-2.0201.tar.gz
/usr/local/Cellar/perl/5.28.1/bin/perl Makefile.PL -- OK
Running make for S/SH/SHLOMIF/XML-LibXML-2.0201.tar.gz
cp lib/XML/LibXML/Attr.pod blib/lib/XML/LibXML/Attr.pod
cp lib/XML/LibXML/Literal.pm blib/lib/XML/LibXML/Literal.pm
cp lib/XML/LibXML/Namespace.pod blib/lib/XML/LibXML/Namespace.pod
cp lib/XML/LibXML/RegExp.pod blib/lib/XML/LibXML/RegExp.pod
cp lib/XML/LibXML/Text.pod blib/lib/XML/LibXML/Text.pod
cp lib/XML/LibXML/Boolean.pm blib/lib/XML/LibXML/Boolean.pm
cp lib/XML/LibXML/RelaxNG.pod blib/lib/XML/LibXML/RelaxNG.pod
cp lib/XML/LibXML/ErrNo.pm blib/lib/XML/LibXML/ErrNo.pm
cp lib/XML/LibXML/Pattern.pod blib/lib/XML/LibXML/Pattern.pod
cp lib/XML/LibXML/PI.pod blib/lib/XML/LibXML/PI.pod
cp lib/XML/LibXML/XPathContext.pod blib/lib/XML/LibXML/XPathContext.pod
cp lib/XML/LibXML/SAX.pod blib/lib/XML/LibXML/SAX.pod
cp lib/XML/LibXML/InputCallback.pod blib/lib/XML/LibXML/InputCallback.pod
cp lib/XML/LibXML/AttributeHash.pm blib/lib/XML/LibXML/AttributeHash.pm
cp lib/XML/LibXML/SAX/Generator.pm blib/lib/XML/LibXML/SAX/Generator.pm
cp lib/XML/LibXML/Error.pm blib/lib/XML/LibXML/Error.pm
cp lib/XML/LibXML/SAX.pm blib/lib/XML/LibXML/SAX.pm
cp lib/XML/LibXML/Reader.pm blib/lib/XML/LibXML/Reader.pm
cp lib/XML/LibXML/XPathContext.pm blib/lib/XML/LibXML/XPathContext.pm
cp lib/XML/LibXML/Element.pod blib/lib/XML/LibXML/Element.pod
cp lib/XML/LibXML/SAX/Builder.pm blib/lib/XML/LibXML/SAX/Builder.pm
cp lib/XML/LibXML/XPathExpression.pod blib/lib/XML/LibXML/XPathExpression.pod
cp lib/XML/LibXML/Common.pod blib/lib/XML/LibXML/Common.pod
cp lib/XML/LibXML/SAX/Builder.pod blib/lib/XML/LibXML/SAX/Builder.pod
cp lib/XML/LibXML/Dtd.pod blib/lib/XML/LibXML/Dtd.pod
cp lib/XML/LibXML/ErrNo.pod blib/lib/XML/LibXML/ErrNo.pod
cp lib/XML/LibXML/NodeList.pm blib/lib/XML/LibXML/NodeList.pm
cp lib/XML/LibXML/SAX/Parser.pm blib/lib/XML/LibXML/SAX/Parser.pm
cp LibXML.pm blib/lib/XML/LibXML.pm
cp lib/XML/LibXML/Comment.pod blib/lib/XML/LibXML/Comment.pod
cp lib/XML/LibXML/Parser.pod blib/lib/XML/LibXML/Parser.pod
cp lib/XML/LibXML/DOM.pod blib/lib/XML/LibXML/DOM.pod
cp lib/XML/LibXML/CDATASection.pod blib/lib/XML/LibXML/CDATASection.pod
cp lib/XML/LibXML/Node.pod blib/lib/XML/LibXML/Node.pod
cp lib/XML/LibXML/Document.pod blib/lib/XML/LibXML/Document.pod
cp LibXML.pod blib/lib/XML/LibXML.pod
cp lib/XML/LibXML/Reader.pod blib/lib/XML/LibXML/Reader.pod
cp lib/XML/LibXML/Error.pod blib/lib/XML/LibXML/Error.pod
cp lib/XML/LibXML/DocumentFragment.pod blib/lib/XML/LibXML/DocumentFragment.pod
cp lib/XML/LibXML/Common.pm blib/lib/XML/LibXML/Common.pm
cp lib/XML/LibXML/Schema.pod blib/lib/XML/LibXML/Schema.pod
cp lib/XML/LibXML/Number.pm blib/lib/XML/LibXML/Number.pm
cp lib/XML/LibXML/Devel.pm blib/lib/XML/LibXML/Devel.pm
Running Mkbootstrap for LibXML ()
chmod 644 "LibXML.bs"
"/usr/local/Cellar/perl/5.28.1/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- LibXML.bs blib/arch/auto/XML/LibXML/LibXML.bs 644
cc -c -I/usr/include/libxml2 -fno-common -DPERL_DARWIN -mmacosx-version-min=10.14 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_PUTENV -O3 -DVERSION=\"2.0201\" -DXS_VERSION=\"2.0201\" "-I/usr/local/Cellar/perl/5.28.1/lib/perl5/5.28.1/darwin-thread-multi-2level/CORE" -DHAVE_UTF8 Av_CharPtrPtr.c
"/usr/local/Cellar/perl/5.28.1/bin/perl" "/usr/local/Cellar/perl/5.28.1/lib/perl5/5.28.1/ExtUtils/xsubpp" -typemap '/usr/local/Cellar/perl/5.28.1/lib/perl5/5.28.1/ExtUtils/typemap' -typemap '/Users/chris/.cpan/build/XML-LibXML-2.0201-28/typemap' Devel.xs > Devel.xsc
mv Devel.xsc Devel.c
cc -c -I/usr/include/libxml2 -fno-common -DPERL_DARWIN -mmacosx-version-min=10.14 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_PUTENV -O3 -DVERSION=\"2.0201\" -DXS_VERSION=\"2.0201\" "-I/usr/local/Cellar/perl/5.28.1/lib/perl5/5.28.1/darwin-thread-multi-2level/CORE" -DHAVE_UTF8 Devel.c
"/usr/local/Cellar/perl/5.28.1/bin/perl" "/usr/local/Cellar/perl/5.28.1/lib/perl5/5.28.1/ExtUtils/xsubpp" -typemap '/usr/local/Cellar/perl/5.28.1/lib/perl5/5.28.1/ExtUtils/typemap' -typemap '/Users/chris/.cpan/build/XML-LibXML-2.0201-28/typemap' LibXML.xs > LibXML.xsc
mv LibXML.xsc LibXML.c
cc -c -I/usr/include/libxml2 -fno-common -DPERL_DARWIN -mmacosx-version-min=10.14 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_PUTENV -O3 -DVERSION=\"2.0201\" -DXS_VERSION=\"2.0201\" "-I/usr/local/Cellar/perl/5.28.1/lib/perl5/5.28.1/darwin-thread-multi-2level/CORE" -DHAVE_UTF8 LibXML.c
cc -c -I/usr/include/libxml2 -fno-common -DPERL_DARWIN -mmacosx-version-min=10.14 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_PUTENV -O3 -DVERSION=\"2.0201\" -DXS_VERSION=\"2.0201\" "-I/usr/local/Cellar/perl/5.28.1/lib/perl5/5.28.1/darwin-thread-multi-2level/CORE" -DHAVE_UTF8 dom.c
cc -c -I/usr/include/libxml2 -fno-common -DPERL_DARWIN -mmacosx-version-min=10.14 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_PUTENV -O3 -DVERSION=\"2.0201\" -DXS_VERSION=\"2.0201\" "-I/usr/local/Cellar/perl/5.28.1/lib/perl5/5.28.1/darwin-thread-multi-2level/CORE" -DHAVE_UTF8 perl-libxml-mm.c
perl-libxml-mm.c:142:18: warning: incompatible pointer types passing 'void (void
*, void *, xmlChar *)' (aka 'void (void *, void *, unsigned char *)') to
parameter of type 'xmlHashScanner' (aka 'void (*)(void *, void *, const
unsigned char *)') [-Wincompatible-pointer-types]
xmlHashScan(r, PmmRegistryDumpHashScanner, NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/libxml/hash.h:213:22: note: passing argument to parameter 'f'
here
xmlHashScanner f,
^
perl-libxml-mm.c:234:44: warning: incompatible pointer types passing 'void
(void *, xmlChar *)' (aka 'void (void *, unsigned char *)') to parameter
of type 'xmlHashDeallocator' (aka 'void (*)(void *, const unsigned char
*)') [-Wincompatible-pointer-types]
if( xmlHashRemoveEntry(PmmREGISTRY, name, PmmRegistryHashDeallocator) )
^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/libxml/hash.h:160:47: note: passing argument to parameter 'f'
here
xmlHashDeallocator f);
^
perl-libxml-mm.c:301:38: warning: incompatible pointer types passing 'void
*(void *, xmlChar *)' (aka 'void *(void *, unsigned char *)') to parameter
of type 'xmlHashCopier' (aka 'void *(*)(void *, const unsigned char *)')
[-Wincompatible-pointer-types]
reg_copy = xmlHashCopy(PmmREGISTRY, PmmRegistryHashCopier);
^~~~~~~~~~~~~~~~~~~~~
/usr/local/include/libxml/hash.h:208:21: note: passing argument to parameter 'f'
here
xmlHashCopier f);
^
3 warnings generated.
cc -c -I/usr/include/libxml2 -fno-common -DPERL_DARWIN -mmacosx-version-min=10.14 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_PUTENV -O3 -DVERSION=\"2.0201\" -DXS_VERSION=\"2.0201\" "-I/usr/local/Cellar/perl/5.28.1/lib/perl5/5.28.1/darwin-thread-multi-2level/CORE" -DHAVE_UTF8 perl-libxml-sax.c
cc -c -I/usr/include/libxml2 -fno-common -DPERL_DARWIN -mmacosx-version-min=10.14 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_PUTENV -O3 -DVERSION=\"2.0201\" -DXS_VERSION=\"2.0201\" "-I/usr/local/Cellar/perl/5.28.1/lib/perl5/5.28.1/darwin-thread-multi-2level/CORE" -DHAVE_UTF8 xpath.c
rm -f blib/arch/auto/XML/LibXML/LibXML.bundle
LD_RUN_PATH="/usr/lib" cc -mmacosx-version-min=10.14 -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector-strong Av_CharPtrPtr.o Devel.o LibXML.o dom.o perl-libxml-mm.o perl-libxml-sax.o xpath.o -o blib/arch/auto/XML/LibXML/LibXML.bundle \
-lxml2 \

chmod 755 blib/arch/auto/XML/LibXML/LibXML.bundle
Manifying 34 pod documents
SHLOMIF/XML-LibXML-2.0201.tar.gz
/usr/bin/make -- OK
The current configuration of allow_installing_outdated_dists is 'ask/yes', but for this option we would need 'CPAN::DistnameInfo' installed. Please install 'CPAN::DistnameInfo' as soon as possible. As long as we are not equipped with 'CPAN::DistnameInfo' this option does not take effect
Running make test for SHLOMIF/XML-LibXML-2.0201.tar.gz
"/usr/local/Cellar/perl/5.28.1/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- LibXML.bs blib/arch/auto/XML/LibXML/LibXML.bs 644
PERL_DL_NONLAZY=1 "/usr/local/Cellar/perl/5.28.1/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-report-prereqs.t .............................. #
# Versions for all modules listed in MYMETA.json (including optional ones):
#
# === Configure Requires ===
#
# Module Want Have
# ------------------- ---- --------
# Alien::Libxml2 any 0.09
# Config any 5.028001
# ExtUtils::MakeMaker any 7.34
#
# === Build Requires ===
#
# Module Want Have
# ------------------- ---- ----
# ExtUtils::MakeMaker any 7.34
#
# === Test Requires ===
#
# Module Want Have
# ------------ ---- --------
# Config any 5.028001
# Errno any 1.29
# IO::File any 1.39
# IO::Handle any 1.39
# POSIX any 1.84
# Scalar::Util any 1.50
# Test::More any 1.302164
# locale any 1.09
# utf8 any 1.21
#
# === Runtime Requires ===
#
# Module Want Have
# ------------------------- ---- -----
# Carp any 1.50
# DynaLoader any 1.45
# Encode any 2.97
# Exporter 5.57 5.73
# IO::Handle any 1.39
# Scalar::Util any 1.50
# Tie::Hash any 1.05
# XML::NamespaceSupport 1.07 1.12
# XML::SAX 0.11 1.02
# XML::SAX::Base any 1.09
# XML::SAX::DocumentLocator any undef
# XML::SAX::Exception any 1.09
# base any 2.27
# constant any 1.33
# overload any 1.30
# parent any 0.236
# strict any 1.11
# vars any 1.04
# warnings any 1.42
#
t/00-report-prereqs.t .............................. ok
t/01basic.t ........................................ Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/01basic.t ........................................ 1/3
# Failed test 'LIBXML__VERSION == LIBXML_RUNTIME_VERSION'
# at t/01basic.t line 18.
# got: '20909'
# expected: '20904'
# DO NOT REPORT THIS FAILURE: Your setup of library paths is incorrect!
#
#
# Compiled against libxml2 version: 20909
# Running libxml2 version: 20904
#
# Looks like you failed 1 test of 3.
t/01basic.t ........................................ Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests
t/02parse.t ........................................ Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/02parse.t ........................................ ok
t/03doc.t .......................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/03doc.t .......................................... ok
t/04node.t ......................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/04node.t ......................................... ok
t/05text.t ......................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/05text.t ......................................... ok
t/06elements.t ..................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/06elements.t ..................................... ok
t/07dtd.t .......................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/07dtd.t .......................................... ok
t/08findnodes.t .................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/08findnodes.t .................................... ok
t/09xpath.t ........................................ Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/09xpath.t ........................................ ok
t/10ns.t ........................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/10ns.t ........................................... ok
t/11memory.t ....................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/11memory.t ....................................... skipped: These tests are for authors only!
t/12html.t ......................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/12html.t ......................................... ok
t/13dtd.t .......................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/13dtd.t .......................................... ok
t/14sax.t .......................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/14sax.t .......................................... ok
t/15nodelist.t ..................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/15nodelist.t ..................................... ok
t/16docnodes.t ..................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/16docnodes.t ..................................... ok
t/17callbacks.t .................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/17callbacks.t .................................... ok
t/18docfree.t ...................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/18docfree.t ...................................... ok
t/19die_on_invalid_utf8_rt_58848.t ................. Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/19die_on_invalid_utf8_rt_58848.t ................. ok
t/19encoding.t ..................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/19encoding.t ..................................... ok
t/20extras.t ....................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/20extras.t ....................................... ok
t/21catalog.t ...................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/21catalog.t ...................................... ok
t/23rawfunctions.t ................................. Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/23rawfunctions.t ................................. ok
t/24c14n.t ......................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/24c14n.t ......................................... ok
t/25relaxng.t ...................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/25relaxng.t ...................................... ok
t/26schema.t ....................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/26schema.t ....................................... ok
t/27new_callbacks_simple.t ......................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/27new_callbacks_simple.t ......................... ok
t/28new_callbacks_multiple.t ....................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/28new_callbacks_multiple.t ....................... ok
t/29id.t ........................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/29id.t ........................................... ok
t/30keep_blanks.t .................................. Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/30keep_blanks.t .................................. ok
t/30xpathcontext.t ................................. Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/30xpathcontext.t ................................. ok
t/31xpc_functions.t ................................ Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/31xpc_functions.t ................................ ok
t/32xpc_variables.t ................................ Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/32xpc_variables.t ................................ ok
t/35huge_mode.t .................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/35huge_mode.t .................................... ok
t/40reader.t ....................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/40reader.t ....................................... ok
t/40reader_mem_error.t ............................. Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/40reader_mem_error.t ............................. ok
t/41xinclude.t ..................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/41xinclude.t ..................................... ok
t/42common.t ....................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/42common.t ....................................... ok
t/43options.t ...................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/43options.t ...................................... ok
t/44extent.t ....................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/44extent.t ....................................... ok
t/45regex.t ........................................ Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/45regex.t ........................................ ok
t/46err_column.t ................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/46err_column.t ................................... ok
t/47load_xml_callbacks.t ........................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/47load_xml_callbacks.t ........................... ok
t/48_memleak_rt_83744.t ............................ skipped: Test::LeakTrace is required for memory leak tests.
t/48_reader_undef_warning_on_empty_str_rt106830.t .. Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/48_reader_undef_warning_on_empty_str_rt106830.t .. ok
t/48_removeChild_crashes_rt_80395.t ................ Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/48_removeChild_crashes_rt_80395.t ................ ok
t/48_replaceNode_DTD_nodes_rT_80521.t .............. Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/48_replaceNode_DTD_nodes_rT_80521.t .............. ok
t/48_RH5_double_free_rt83779.t ..................... skipped: Test::LeakTrace is required.
t/48_rt123379_setNamespace.t ....................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/48_rt123379_setNamespace.t ....................... ok
t/48_rt55000.t ..................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/48_rt55000.t ..................................... ok
t/48_rt93429_recover_2_in_html_parsing.t ........... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/48_rt93429_recover_2_in_html_parsing.t ........... ok
t/48_SAX_Builder_rt_91433.t ........................ Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/48_SAX_Builder_rt_91433.t ........................ ok
t/48importing_nodes_IDs_rt_69520.t ................. Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/48importing_nodes_IDs_rt_69520.t ................. ok
t/49_load_html.t ................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/49_load_html.t ................................... ok
t/49callbacks_returning_undef.t .................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/49callbacks_returning_undef.t .................... skipped: URI::file is not available.
t/49global_extent.t ................................ Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/49global_extent.t ................................ ok
t/50devel.t ........................................ Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/50devel.t ........................................ ok
t/51_parse_html_string_rt87089.t ................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/51_parse_html_string_rt87089.t ................... ok
t/60error_prev_chain.t ............................. Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/60error_prev_chain.t ............................. ok
t/60struct_error.t ................................. Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/60struct_error.t ................................. ok
t/61error.t ........................................ Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/61error.t ........................................ ok
t/62overload.t ..................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/62overload.t ..................................... ok
t/71overloads.t .................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/71overloads.t .................................... ok
t/72destruction.t .................................. Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/72destruction.t .................................. ok
t/80registryleak.t ................................. Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/80registryleak.t ................................. ok
t/90shared_clone_failed_rt_91800.t ................. skipped: optional (set THREAD_TEST=1 to run these tests)
t/90stack.t ........................................ Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/90stack.t ........................................ ok
t/90threads.t ...................................... skipped: optional (set THREAD_TEST=1 to run these tests)
t/91unique_key.t ................................... Warning: XML::LibXML compiled against libxml2 20909, but runtime libxml2 is older 20904
t/91unique_key.t ................................... ok
t/cpan-changes.t ................................... skipped: These tests are for authors only!
t/pod-files-presence.t ............................. ok
t/pod.t ............................................ skipped: These tests are for authors only!
t/release-kwalitee.t ............................... skipped: These tests are for authors only!
t/style-trailing-space.t ........................... skipped: These tests are for authors only!

Test Summary Report
-------------------
t/01basic.t (Wstat: 256 Tests: 3 Failed: 1)
Failed test: 3
Non-zero exit status: 1
Files=75, Tests=2528, 16 wallclock secs ( 0.46 usr 0.22 sys + 9.89 cusr 2.32 csys = 12.89 CPU)
Result: FAIL
Failed 1/75 test programs. 1/2528 subtests failed.
make: *** [test_dynamic] Error 255
SHLOMIF/XML-LibXML-2.0201.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports SHLOMIF/XML-LibXML-2.0201.tar.gz`

最佳答案

所以经过多次试验和错误,我终于通过两个简单的步骤解决了这个问题:

1.复制所有.h /usr/local/opt/libxml2/include/libxml2/libxml 中的文件至 /usr/local/include/libxml
2.复制/usr/local/opt/libxml2/lib中的文件和文件夹至 /usr/local/lib分别。

这解决了问题。
:)

谢谢@Håkon Hægland 和@ikegami 指出正确的方向。

关于xml - cpan 无法在 macOS Catalina 上安装 XML::LibXML,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56898431/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com