我試圖以用戶身份安裝HTML :: TreeBuilder :: XPath。但我得到這個錯誤:無法用cpanm安裝HTML :: TreeBuilder :: XPath
Building and testing HTML-Parser-3.71 ... FAIL
! Installing HTML::Entities failed. See /home/user/.cpanm/build.log for details.
所以,如果我來看看這個文件/home/user/.cpanm/build.log我得到這個錯誤:
Result: FAIL
Failed 3/48 test programs. 0/423 subtests failed.
make: *** [test_dynamic] Error 255
-> FAIL Installing HTML::Entities failed. See /home/user/.cpanm/build.log for details.
Searching HTML::Parser on cpanmetadb ...
Already tried HTML-Parser-3.71. Skipping.
Already tried HTML::Tagset. Skipping.
-> FAIL Bailing out the installation for HTML-Tree-5.03. Retry with --prompt or --force.
-> FAIL Bailing out the installation for HTML-TreeBuilder-XPath-0.14. Retry with --prompt or --force.
3 distributions installed
所以我嘗試到manualy安裝HTML ::實體和我得到這個錯誤:
Successfully installed HTML-Tagset-3.20
Building and testing HTML-Parser-3.71 ... FAIL
! Installing HTML::Entities failed. See /home/user/.cpanm/build.log for details.
1 distribution installed
Can't locate HTML/Tagset.pm in @INC (@INC contains: /home/user/.cpanm/work/1403630727.28688/HTML-Parser-3.71/blib/lib /home/user/.cpanm/work/1403630727.28688/HTML-Parser-3.71/blib/arch /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /home/user/.cpanm/work/1403630727.28688/HTML-Parser-3.71/blib/lib/HTML/TokeParser.pm line 10.
所以說,它無法找到HTML ::標記集,但它一直研究所只等了幾行!而在最後,我得到這個錯誤:
Result: FAIL
Failed 3/48 test programs. 0/423 subtests failed.
make: *** [test_dynamic] Error 255
-> FAIL Installing HTML::Entities failed. See /home/user/.cpanm/build.log for details.
1 distribution installed
,如果我看一看/home/user/.cpanm/build.log我得到完全相同的輸出。
請問有什麼不對?
試「的perl -MHTML ::標記集 - d -e 0',看看會發生什麼。它可以找到並加載軟件包,或者對你有影響嗎? –
@LenJaffe它找不到該模塊: 無法在INC中找到HTML/Tagset.pm(INC包含:/ etc/perl /usr/local/lib/perl/5.14.2/usr/local/share /perl/5.14.2/usr/lib/perl5/usr/share/perl5/usr/lib/perl/5.14/usr/share/perl/5.14/usr/local/lib/site_perl。)。 我該怎麼做才能讓perl找到模塊? PS:我不得不刪除「@」,因爲SO說我不能通知多個用戶。 – Antoine
搬到答案的地方,我有更多的自由來表達我自己 –