Search code examples
perlminicondalwp

HTML-Parser distribution installing issue


I'm trying to install LWP::Simple, which has HTML-Parser as a dependency.

I was looking if my problem with the installation the HTML-Parser distribution module was resolved on any other posts but (at first glance) it seems to be nothing similar.

Here are the error messages that I got:

cpan[1]> install LWP::Simple 
Reading '/home/valentinignacio/.cpan/Metadata'
  Database was generated on Mon, 22 Mar 2021 00:17:03 GMT
Running install for module 'LWP::Simple'
Checksum for /home/valentinignacio/.cpan/sources/authors/id/O/OA/OALDERS/libwww-perl-6.53.tar.gz ok
Scanning cache /home/valentinignacio/.cpan/build for sizes
............................................................................DONE
'YAML' not installed, will not store persistent state
Configuring O/OA/OALDERS/libwww-perl-6.53.tar.gz with Makefile.PL
HTTP::Status already exists in PREREQ_PM (at version 6.07) -- need to do a sane metamerge! at Makefile.PL line 159.
HTTP::Status already exists in FallbackPrereqs (at version 6.07) -- need to do a sane metamerge! at Makefile.PL line 162.
Checking if your kit is complete...
Looks good
Warning: prerequisite HTML::Entities 0 not found.
Warning: prerequisite HTML::HeadParser 0 not found.
Generating a Unix-style Makefile
Writing Makefile for libwww::perl
Writing MYMETA.yml and MYMETA.json
  OALDERS/libwww-perl-6.53.tar.gz
  /home/valentinignacio/miniconda3/bin/perl Makefile.PL -- OK
Running make for O/OA/OALDERS/libwww-perl-6.53.tar.gz
---- Unsatisfied dependencies detected during ----
----      OALDERS/libwww-perl-6.53.tar.gz     ----
    HTML::Entities [requires]
    HTML::HeadParser [requires]
    Test::LeakTrace [build_requires,optional]
Running install for module 'HTML::Entities'
Checksum for /home/valentinignacio/.cpan/sources/authors/id/O/OA/OALDERS/HTML-Parser-3.76.tar.gz ok
Configuring O/OA/OALDERS/HTML-Parser-3.76.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for HTML::Parser
Writing MYMETA.yml and MYMETA.json
  OALDERS/HTML-Parser-3.76.tar.gz
  /home/valentinignacio/miniconda3/bin/perl Makefile.PL -- OK
Running make for O/OA/OALDERS/HTML-Parser-3.76.tar.gz
cp lib/HTML/HeadParser.pm blib/lib/HTML/HeadParser.pm
cp lib/HTML/Filter.pm blib/lib/HTML/Filter.pm
cp lib/HTML/Parser.pm blib/lib/HTML/Parser.pm
cp lib/HTML/PullParser.pm blib/lib/HTML/PullParser.pm
cp lib/HTML/Entities.pm blib/lib/HTML/Entities.pm
cp lib/HTML/TokeParser.pm blib/lib/HTML/TokeParser.pm
cp lib/HTML/LinkExtor.pm blib/lib/HTML/LinkExtor.pm
Running Mkbootstrap for Parser ()
chmod 644 "Parser.bs"
"/home/valentinignacio/miniconda3/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Parser.bs blib/arch/auto/HTML/Parser/Parser.bs 644
"/home/valentinignacio/miniconda3/bin/perl" "/home/valentinignacio/miniconda3/lib/5.32.0/ExtUtils/xsubpp"  -typemap '/home/valentinignacio/miniconda3/lib/5.32.0/ExtUtils/typemap' -typemap '/home/valentinignacio/.cpan/build/HTML-Parser-3.76-4/typemap'  Parser.xs > Parser.xsc
mv Parser.xsc Parser.c
/home/valentinignacio/miniconda3/bin/..//bin/x86_64-conda-linux-gnu-gcc -c   -D_REENTRANT -D_GNU_SOURCE --sysroot=/home/valentinignacio/miniconda3/bin/..//x86_64-conda-linux-gnu/sysroot -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2   -DVERSION=\"3.76\" -DXS_VERSION=\"3.76\" -fPIC --sysroot=/home/valentinignacio/miniconda3/bin/..//x86_64-conda-linux-gnu/sysroot "-I/home/valentinignacio/miniconda3/lib/5.32.0/x86_64-linux-thread-multi/CORE"  -DMARKED_SECTION Parser.c
/bin/sh: 1: /home/valentinignacio/miniconda3/bin/..//bin/x86_64-conda-linux-gnu-gcc: not found
make: *** [Makefile:358: Parser.o] Error 127
  OALDERS/HTML-Parser-3.76.tar.gz
  /usr/bin/make -- NOT OK
[continues]

This ultimately leads to a failure to install LWP::Simple.

[continued from above]
Running install for module 'HTML::HeadParser'
  OALDERS/HTML-Parser-3.76.tar.gz
  Has already been unwrapped into directory /home/valentinignacio/.cpan/build/HTML-Parser-3.76-4
  OALDERS/HTML-Parser-3.76.tar.gz
  Has already been prepared
  OALDERS/HTML-Parser-3.76.tar.gz
  Could not make: Unknown error
  OALDERS/libwww-perl-6.53.tar.gz
  Has already been unwrapped into directory /home/valentinignacio/.cpan/build/libwww-perl-6.53-4
  OALDERS/libwww-perl-6.53.tar.gz
  Has already been prepared
Running make for O/OA/OALDERS/libwww-perl-6.53.tar.gz
Warning: Prerequisite 'HTML::Entities => 0' for 'OALDERS/libwww-perl-6.53.tar.gz' failed when processing 'OALDERS/HTML-Parser-3.76.tar.gz' with 'make => NO'. Continuing, but chances to succeed are limited.
Warning: Prerequisite 'HTML::HeadParser => 0' for 'OALDERS/libwww-perl-6.53.tar.gz' failed when processing 'OALDERS/HTML-Parser-3.76.tar.gz' with 'make => NO'. Continuing, but chances to succeed are limited.
---- Unsatisfied dependencies detected during ----
----      OALDERS/libwww-perl-6.53.tar.gz     ----
    Test::LeakTrace [build_requires,optional]
cp lib/LWP/Protocol/nntp.pm blib/lib/LWP/Protocol/nntp.pm
cp lib/LWP/Protocol/nogo.pm blib/lib/LWP/Protocol/nogo.pm
cp lib/LWP/RobotUA.pm blib/lib/LWP/RobotUA.pm
cp lib/LWP/Debug.pm blib/lib/LWP/Debug.pm
cp lib/LWP/DebugFile.pm blib/lib/LWP/DebugFile.pm
cp lib/LWP/UserAgent.pm blib/lib/LWP/UserAgent.pm
cp lib/LWP/Protocol.pm blib/lib/LWP/Protocol.pm
cp lib/LWP/Protocol/ftp.pm blib/lib/LWP/Protocol/ftp.pm
cp lib/LWP/Authen/Digest.pm blib/lib/LWP/Authen/Digest.pm
cp lib/LWP/Debug/TraceHTTP.pm blib/lib/LWP/Debug/TraceHTTP.pm
cp lib/LWP/Protocol/cpan.pm blib/lib/LWP/Protocol/cpan.pm
cp lib/LWP/Simple.pm blib/lib/LWP/Simple.pm
cp lwpcook.pod blib/lib/libwww/lwpcook.pod
cp lib/LWP/Authen/Ntlm.pm blib/lib/LWP/Authen/Ntlm.pm
cp lib/LWP/Protocol/loopback.pm blib/lib/LWP/Protocol/loopback.pm
cp lib/LWP/Protocol/gopher.pm blib/lib/LWP/Protocol/gopher.pm
cp lib/LWP/ConnCache.pm blib/lib/LWP/ConnCache.pm
cp lib/LWP/Protocol/data.pm blib/lib/LWP/Protocol/data.pm
cp lwptut.pod blib/lib/libwww/lwptut.pod
cp lib/LWP/Protocol/file.pm blib/lib/LWP/Protocol/file.pm
cp lib/LWP/Authen/Basic.pm blib/lib/LWP/Authen/Basic.pm
cp lib/LWP/MemberMixin.pm blib/lib/LWP/MemberMixin.pm
cp lib/LWP.pm blib/lib/LWP.pm
cp lib/LWP/Protocol/mailto.pm blib/lib/LWP/Protocol/mailto.pm
cp lib/LWP/Protocol/http.pm blib/lib/LWP/Protocol/http.pm
cp bin/lwp-download blib/script/lwp-download
"/home/valentinignacio/miniconda3/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/lwp-download
cp bin/lwp-dump blib/script/lwp-dump
"/home/valentinignacio/miniconda3/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/lwp-dump
cp bin/lwp-mirror blib/script/lwp-mirror
"/home/valentinignacio/miniconda3/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/lwp-mirror
cp bin/lwp-request blib/script/lwp-request
"/home/valentinignacio/miniconda3/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/lwp-request
Manifying 4 pod documents
Manifying 11 pod documents
  OALDERS/libwww-perl-6.53.tar.gz
  /usr/bin/make -- OK
The current configuration of allow_installing_outdated_dists is 'ask/no', 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 OALDERS/libwww-perl-6.53.tar.gz
PERL_DL_NONLAZY=1 "/home/valentinignacio/miniconda3/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/base/*.t t/base/protocols/*.t t/leak/*.t t/local/*.t t/robot/*.t
t/00-report-prereqs.t .......... # 
# Versions for all modules listed in MYMETA.json (including optional ones):
# 
# === Configure Requires ===
# 
#     Module                       Want     Have
#     ------------------------ -------- --------
#     CPAN::Meta::Requirements 2.120620    2.140
#     ExtUtils::MakeMaker           any     7.44
#     File::Copy                    any     2.34
#     Getopt::Long                  any     2.51
#     Module::Metadata              any 1.000037
# 
# === Build Requires ===
# 
#     Module              Want Have
#     ------------------- ---- ----
#     ExtUtils::MakeMaker  any 7.44
# 
# === Test Requires ===
# 
#     Module                 Want     Have
#     ---------------------- ---- --------
#     ExtUtils::MakeMaker     any     7.44
#     File::Spec              any     3.78
#     FindBin                 any     1.51
#     HTTP::Daemon           6.12     6.12
#     Test::Fatal             any    0.016
#     Test::More             0.96 1.302175
#     Test::Needs             any 0.002006
#     Test::RequiresInternet  any     0.05
# 
# === Test Recommends ===
# 
#     Module              Want     Have
#     --------------- -------- --------
#     CPAN::Meta      2.120900 2.150010
#     Test::LeakTrace      any  missing
# 
# === Runtime Requires ===
# 
#     Module                Want    Have
#     --------------------- ---- -------
#     Digest::MD5            any 2.55_01
#     Encode                2.12    3.06
#     Encode::Locale         any    1.05
#     File::Listing            6    6.14
#     HTML::Entities         any missing
#     HTML::HeadParser       any missing
#     HTTP::Cookies            6    6.10
#     HTTP::Date               6    6.05
#     HTTP::Negotiate          6    6.01
#     HTTP::Request            6    6.29
#     HTTP::Request::Common    6    6.29
#     HTTP::Response           6    6.29
#     HTTP::Status          6.18    6.29
#     IO::Select             any    1.42
#     IO::Socket             any    1.43
#     LWP::MediaTypes          6    6.04
#     MIME::Base64           2.1    3.15
#     Net::FTP              2.58    3.11
#     Net::HTTP             6.18    6.21
#     Scalar::Util           any    1.55
#     Try::Tiny              any    0.30
#     URI                   1.10    5.09
#     URI::Escape            any    5.09
#     WWW::RobotRules          6    6.02
#     base                   any    2.27
#     strict                 any    1.11
#     warnings               any    1.47
# 
# === Runtime Suggests ===
# 
#     Module               Want    Have
#     -------------------- ---- -------
#     Authen::NTLM         1.02 missing
#     Data::Dump           1.13 missing
#     IO::Socket::INET      any    1.41
#     LWP::Protocol::https 6.02 missing
# 
# 
# *** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***
t/00-report-prereqs.t .......... 1/1 # 
# The following REQUIRED prerequisites were not satisfied:
# 
# HTML::Entities is not installed (any version required)
# HTML::HeadParser is not installed (any version required)
# 
t/00-report-prereqs.t .......... ok   
t/10-attrs.t ................... ok   
t/base/default_content_type.t .. # Some tests for the PUT/PATCH methods can only be run on 
# HTTP::Request version 6.07/6.12 or higher.
# If your version isn't good enough, we'll skip those.
# Your version is 6.29 and that's good enough
t/base/default_content_type.t .. ok   
t/base/protocols.t ............. ok   
t/base/protocols/nntp.t ........ skipped: nntp.perl.org is unstable and Test::RequiresInternet is not catching it
t/base/proxy.t ................. ok   
t/base/simple.t ................ ok   
t/base/ua.t .................... 1/? 
#   Failed test '$res->header("Content-Style-Type", "text/css")'
#   at t/base/ua.t line 122.

#   Failed test '$res->header("Content-Script-Type", "text/javascript")'
#   at t/base/ua.t line 123.
# Looks like you failed 2 tests of 51.
t/base/ua.t .................... Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/51 subtests 
t/base/ua_handlers.t ........... ok   
t/leak/no_leak.t ............... skipped: Need Test::LeakTrace
t/local/autoload-get.t ......... 1/4 
#   Failed test 'Response was successful'
#   at t/local/autoload-get.t line 26.
# Looks like you failed 1 test of 4.
t/local/autoload-get.t ......... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/4 subtests 
t/local/autoload.t ............. 1/4 
#   Failed test 'Response was successful'
#   at t/local/autoload.t line 29.
# <html>
# <head><title>An Error Occurred</title></head>
# <body>
# <h1>An Error Occurred</h1>
# <p>500 Can't locate HTML/Entities.pm in @INC (you may need to install the HTML::Entities module) (@INC contains: /home/valentinignacio/.cpan/build/libwww-perl-6.53-4/blib/lib /home/valentinignacio/.cpan/build/libwww-perl-6.53-4/blib/arch /home/valentinignacio/miniconda3/lib/site_perl/5.32.0/x86_64-linux-thread-multi /home/valentinignacio/miniconda3/lib/site_perl/5.32.0 /home/valentinignacio/miniconda3/lib/5.32.0/x86_64-linux-thread-multi /home/valentinignacio/miniconda3/lib/5.32.0 .)</p>
# </body>
# </html>
# Looks like you failed 1 test of 4.
t/local/autoload.t ............. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/4 subtests 
t/local/get.t .................. ok   
t/local/http.t ................. 1/130 
#   Failed test 'get file: good title'
#   at t/local/http.t line 178.
#          got: undef
#     expected: 'En pr�ve'

#   Failed test 'get file: good content'
#   at t/local/http.t line 179.
#                   ''
#     doesn't match '(?^u:� v�re)'

#   Failed test 'terminate: bye bye'
#   at t/local/http.t line 438.
#                   ''
#     doesn't match '(?^:Bye, bye)'
# Looks like you failed 3 tests of 130.
t/local/http.t ................. Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/130 subtests 
t/local/httpsub.t .............. ok   
t/local/protosub.t ............. ok   
t/redirect.t ................... ok   
t/robot/ua-get.t ............... ok     
t/robot/ua.t ................... ok     

Test Summary Report
-------------------
t/base/ua.t                  (Wstat: 512 Tests: 51 Failed: 2)
  Failed tests:  20-21
  Non-zero exit status: 2
t/local/autoload-get.t       (Wstat: 256 Tests: 4 Failed: 1)
  Failed test:  4
  Non-zero exit status: 1
t/local/autoload.t           (Wstat: 256 Tests: 4 Failed: 1)
  Failed test:  4
  Non-zero exit status: 1
t/local/http.t               (Wstat: 768 Tests: 130 Failed: 3)
  Failed tests:  37-38, 129
  Non-zero exit status: 3
Files=19, Tests=269, 17 wallclock secs ( 0.06 usr  0.03 sys +  1.64 cusr  0.20 csys =  1.93 CPU)
Result: FAIL
Failed 4/19 test programs. 7/269 subtests failed.
make: *** [Makefile:1029: test_dynamic] Error 255
Lockfile removed.
  OALDERS/libwww-perl-6.53.tar.gz
2 dependencies missing (HTML::Entities,HTML::HeadParser); additionally test harness failed
  /usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports OALDERS/libwww-perl-6.53.tar.gz
Running install for module 'Test::LeakTrace'
Checksum for /home/valentinignacio/.cpan/sources/authors/id/L/LE/LEEJO/Test-LeakTrace-0.17.tar.gz ok
Configuring L/LE/LEEJO/Test-LeakTrace-0.17.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Test::LeakTrace
Writing MYMETA.yml and MYMETA.json
  LEEJO/Test-LeakTrace-0.17.tar.gz
  /home/valentinignacio/miniconda3/bin/perl Makefile.PL -- OK
Running make for L/LE/LEEJO/Test-LeakTrace-0.17.tar.gz
cp lib/Test/LeakTrace/JA.pod blib/lib/Test/LeakTrace/JA.pod
cp lib/Test/LeakTrace.pm blib/lib/Test/LeakTrace.pm
cp lib/Test/LeakTrace/Script.pm blib/lib/Test/LeakTrace/Script.pm
Running Mkbootstrap for LeakTrace ()
chmod 644 "LeakTrace.bs"
"/home/valentinignacio/miniconda3/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- LeakTrace.bs blib/arch/auto/Test/LeakTrace/LeakTrace.bs 644
"/home/valentinignacio/miniconda3/bin/perl" "/home/valentinignacio/miniconda3/lib/5.32.0/ExtUtils/xsubpp"  -typemap '/home/valentinignacio/miniconda3/lib/5.32.0/ExtUtils/typemap'  LeakTrace.xs > LeakTrace.xsc
mv LeakTrace.xsc LeakTrace.c
/home/valentinignacio/miniconda3/bin/..//bin/x86_64-conda-linux-gnu-gcc -c   -D_REENTRANT -D_GNU_SOURCE --sysroot=/home/valentinignacio/miniconda3/bin/..//x86_64-conda-linux-gnu/sysroot -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2   -DVERSION=\"0.17\" -DXS_VERSION=\"0.17\" -fPIC --sysroot=/home/valentinignacio/miniconda3/bin/..//x86_64-conda-linux-gnu/sysroot "-I/home/valentinignacio/miniconda3/lib/5.32.0/x86_64-linux-thread-multi/CORE"   LeakTrace.c
/bin/sh: 1: /home/valentinignacio/miniconda3/bin/..//bin/x86_64-conda-linux-gnu-gcc: not found
make: *** [Makefile:340: LeakTrace.o] Error 127
  LEEJO/Test-LeakTrace-0.17.tar.gz
  /usr/bin/make -- NOT OK
Running install for module 'Test::LeakTrace'
  LEEJO/Test-LeakTrace-0.17.tar.gz
  Has already been unwrapped into directory /home/valentinignacio/.cpan/build/Test-LeakTrace-0.17-4
  LEEJO/Test-LeakTrace-0.17.tar.gz
  Has already been prepared
  LEEJO/Test-LeakTrace-0.17.tar.gz
  Could not make: Unknown error

Failed during this command:
 OALDERS/HTML-Parser-3.76.tar.gz              : make NO
 OALDERS/libwww-perl-6.53.tar.gz              : make_test NO 2 dependencies missing (HTML::Entities,HTML::HeadParser); additionally test harness failed
 (optional) LEEJO/Test-LeakTrace-0.17.tar.gz  : make NO

What can I do? I Tried to install manually the dependencies (Entities and HeadParser) but I got the next unknown errors for both:

cpan[3]> install HTML::Entities                                                 
Running install for module 'HTML::Entities'
  OALDERS/HTML-Parser-3.76.tar.gz
  Has already been unwrapped into directory /home/valentinignacio/.cpan/build/HTML-Parser-3.76-4
  OALDERS/HTML-Parser-3.76.tar.gz
  Has already been prepared
  OALDERS/HTML-Parser-3.76.tar.gz
  Could not make: Unknown error

I'll be so thankful if you can help me with this :)


Solution

  • This is the relevant line:

    /bin/sh: 1: /home/valentinignacio/miniconda3/bin/..//bin/x86_64-conda-linux-gnu-gcc: not found
    

    perl was built using a compiler found at /home/valentinignacio/miniconda3/bin/x86_64-conda-linux-gnu-gcc, but it no longer exists at that location.[1] It is needed, so reinstall it.


    Once this is rectified, run cpan LWP::Simple again. You may need to run the following command in cpan first:

    o conf build_dir_reuse 0
    o conf commit
    

    This resets the build_dir_reuse setting back to its default value. The default value of this settings causes the "Has already been unwrapped into directory" and "Has already been prepared" checks to be avoided, forcing a sincere attempt to install the module even if a previous attempt failed.


    1. Ok, technically, you copied the perl installation from another machine (by installing the appropriate package), but didn't copy over gcc (by installing the appropriate package). Potato potahto.