1

I'm trying to install HTML::TreeBuilder::XPath as user. but I get this error :

Building and testing HTML-Parser-3.71 ... FAIL
! Installing HTML::Entities failed. See /home/user/.cpanm/build.log for details.

So if I take a look at this file /home/user/.cpanm/build.log I get this error :

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

So I try to manualy install HTML::Entities and I get this error :

  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.

So it say it can't locate HTML::Tagset, but it has been installed just a few line before ! And at the end, I get this errors :

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

and if I take a look at /home/user/.cpanm/build.log I get exactly the same output.

What's wrong please ?

Antoine
  • 355
  • 2
  • 12
  • 1
    try 'perl -MHTML::Tagset -d -e 0' and see what happens. Can it find and load the package, or does that also error on you? – Len Jaffe Jun 25 '14 at 15:48
  • @LenJaffe it can't find the module : Can't locate HTML/Tagset.pm in INC (INC contains: /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 .). what can I do to let perl find the modules please ? PS : I had to remove the "@" because SO says I can't notify more than one user. – Antoine Jun 25 '14 at 15:55
  • moving to answer-land where I have more freedom to express myself – Len Jaffe Jun 25 '14 at 17:34

2 Answers2

1

Given that you cannot find the HTML::Tagset module from the command line, it is possible you did not actually install it, despite being told that you had.

One other test for it wold be:

    $ perldoc HTML::Tagset

Then I would look for it using locate(1)

    $ locate HTML/Tagset.pm

You may get a lot of output that you'll have to go through, or you might get none. You might be told that the database that locate relies on is not initialized, or is out of date. You can either refresh the database, or try find(1)

   $ find / -name 'Tagset.pm' -print  | less

If you still cant find it, or you grow tired of searching, then just fire up your favorite CPAN client, and install HTML::Tagset and then HTML::Entities explicitly.

Len Jaffe
  • 3,442
  • 1
  • 21
  • 28
  • Thank you for you answer. Indeed the manual was not display with perldoc and locate find me many path where it was. Finally I follow your advice, by installing the module with an other way. I haven't use cpan, but I have installed the debian package. It was easier. Thanks you ! – Antoine Jun 25 '14 at 18:13
  • I'm pleased that I could help. – Len Jaffe Jun 25 '14 at 19:25
0

I havent told cpanminus to use my local library.

Here is the solution to install all module as user :

cd ~/;
cpanm local::lib;
echo 'eval `perl -I$HOME/perl5/lib/perl5 -Mlocal::lib`' >> ~/.bashrc ;
source ~/.bashrc;

after that, I can install all modules and dependancies as user with

cpanm module::name
Antoine
  • 355
  • 2
  • 12