Thread: CPAN Help

    #1
  1. No Profile Picture
    Contributing User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jul 2003
    Posts
    4,365
    Rep Power
    630

    CPAN Help


    I'm trying to install CPAN modules and getting all kinds of missing pm messages. I'm at my wits end trying to figure out why. I'm running perl with cygwin if that matters. I am not understanding why CPAN insists on installing in .local rather than somewhere already in @INC:

    @INC:
    /usr/lib/perl5/site_perl/5.22/x86_64-cygwin-threads
    /usr/lib/perl5/site_perl/5.22
    /usr/lib/perl5/vendor_perl/5.22/x86_64-cygwin-threads
    /usr/lib/perl5/vendor_perl/5.22
    /usr/lib/perl5/5.22/x86_64-cygwin-threads
    /usr/lib/perl5/5.22

    I let the config default:

    applypatch []
    auto_commit [0]
    build_cache [100]
    build_dir [/home/myuser/.local/share/.cpan/build]
    build_dir_reuse [0]
    build_requires_install_policy [yes]
    bzip2 [/usr/bin/bzip2]
    cache_metadata [1]
    check_sigs [0]
    colorize_debug undef
    colorize_output [0]
    colorize_print undef
    colorize_warn undef
    commandnumber_in_prompt [1]
    commands_quote undef
    connect_to_internet_ok [1]
    cpan_home [/home/myuser/.local/share/.cpan]
    curl undef
    dontload_hash undef
    dontload_list undef
    ftp undef
    ftp_passive [1]
    ftp_proxy []
    ftpstats_period undef
    ftpstats_size undef
    getcwd [cwd]
    gpg [/cygdrive/c/Program Files (x86)/GNU/GnuPG/pub/gpg.EXE]
    gzip [/usr/bin/gzip]
    halt_on_failure [0]
    histfile [/home/myuser/.local/share/.cpan/histfile]
    histsize [100]
    http_proxy []
    inactivity_timeout [0]
    index_expire [1]
    inhibit_startup_message [0]
    keep_source_where [/home/myuser/.local/share/.cpan/sources]
    load_module_verbosity [none]
    lynx undef
    make [/usr/bin/make]
    make_arg []
    make_install_arg []
    make_install_make_command [sudo /usr/bin/make]
    makepl_arg []
    mbuild_arg []
    mbuild_install_arg []
    mbuild_install_build_command [sudo ./Build]
    mbuildpl_arg []
    ncftp undef
    ncftpget undef
    no_proxy []
    pager [/usr/bin/less]
    password undef
    patch []
    patches_dir undef
    perl5lib_verbosity [none]
    plugin_list undef
    prefer_external_tar [1]
    prefer_installer [MB]
    prefs_dir [/home/myuser/.local/share/.cpan/prefs]
    prerequisites_policy [follow]
    proxy_pass undef
    proxy_user undef
    randomize_urllist undef
    recommends_policy [1]
    scan_cache [atstart]
    shell [/bin/bash]
    show_unparsable_versions [0]
    show_upload_date [0]
    show_zero_versions [0]
    suggests_policy [0]
    tar [/usr/bin/tar]
    tar_verbosity [none]
    term_is_latin [1]
    term_ornaments [1]
    test_report [0]
    trust_test_report_history [0]
    unzip [/usr/bin/unzip]
    urllist
    0 []404 Not Found
    use_prompt_default [0]
    use_sqlite [0]
    username undef
    version_timeout [15]
    wait_list undef
    wget [/usr/bin/wget]
    yaml_load_code [0]
    yaml_module [YAML]

    I can use the 'find' command to verify that the needed module is installed and in the directory tree. But it seems like perl will not traverse sub-directories in the .local path. Does anyone have any ideas? TIA.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Apr 2009
    Posts
    2,232
    Rep Power
    1296
    What module(s) are you trying to install?

    What are the error messages?

    What is the output of: perl -V

    I am not understanding why CPAN insists on installing in .local rather than somewhere already in @INC
    It's not installing the module under .local. That's the configured location where it puts the files during the build process.
    build_dir [/home/myuser/.local/share/.cpan/build]

    If the build/install is successful, the module will be installed in one of the @INC paths.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jul 2003
    Posts
    4,365
    Rep Power
    630
    I'm trying to install WWW::Mechanize. The typical error is (occurs numerous times):

    # Error: Can't locate HTML/Form.pm in @INC (you may need to install the HTM
    L::Form module) (@INC contains: t/local /home/myuser/.local/share/.cpan/b
    uild/WWW-Mechanize-1.75-dCkDAH/blib/lib /home/myuser/.local/share/.cpan/b
    uild/WWW-Mechanize-1.75-dCkDAH/blib/arch /usr/lib/perl5/site_perl/5.22/x86_64-cy
    gwin-threads /usr/lib/perl5/site_perl/5.22 /usr/lib/perl5/vendor_perl/5.22/x86_6
    4-cygwin-threads /usr/lib/perl5/vendor_perl/5.22 /usr/lib/perl5/5.22/x86_64-cygw
    in-threads /usr/lib/perl5/5.22 .) at /home/myuser/.local/share/.cpan/buil
    d/WWW-Mechanize-1.75-dCkDAH/blib/lib/WWW/Mechanize.pm line 133.
    # BEGIN failed--compilation aborted at /home/myuser/.local/share/.cpan/bu
    ild/WWW-Mechanize-1.75-dCkDAH/blib/lib/WWW/Mechanize.pm line 133.
    # Compilation failed in require at t/local/form.t line 10.

    perl -v

    Summary of my perl5 (revision 5 version 22 subversion 1) configuration:

    Platform:
    osname=cygwin, osvers=2.5.0(0.29453), archname=cygwin-thread-multi
    uname='cygwin_nt-6.3 cygwin 2.5.0(0.29453) 2016-02-18 14:15 x86_64 cygwin '
    config_args='-d -e -Dprefix=/usr -Dmksymlinks -Darchname=x86_64-cygwin-threa
    ds -Dlibperl=cygperl5_22.dll -Dcc=gcc -Dld=g++ -Accflags=-ggdb -O2 -pipe -Wimpli
    cit-function-declaration -fdebug-prefix-map=/mnt/share/maint/perl.x86_64/build=/
    usr/src/debug/perl-5.22.1-2 -fdebug-prefix-map=/mnt/share/maint/perl.x86_64/src/
    perl-98c63ea=/usr/src/debug/perl-5.22.1-2 -fwrapv'
    hint=previous, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
    Compiler:
    cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -ggdb -O2 -pipe
    -Wimplicit-function-declaration -fdebug-prefix-map=/mnt/share/maint/perl.x86_64
    /build=/usr/src/debug/perl-5.22.1-1 -fdebug-prefix-map=/mnt/share/maint/perl.x86
    _64/src/perl-98c63ea=/usr/src/debug/perl-5.22.1-1 -fwrapv -fno-strict-aliasing -
    fstack-protector-strong -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-
    prefix-map=/mnt/share/maint/perl.x86_64/build=/usr/src/debug/perl-5.22.1-2 -fdeb
    ug-prefix-map=/mnt/share/maint/perl.x86_64/src/perl-98c63ea=/usr/src/debug/perl-
    5.22.1-2 -fwrapv',
    optimize='-O3',
    cppflags='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -ggdb -O2 -pipe -Wimplici
    t-function-declaration -fdebug-prefix-map=/mnt/share/maint/perl.x86_64/build=/us
    r/src/debug/perl-5.22.1-1 -fdebug-prefix-map=/mnt/share/maint/perl.x86_64/src/pe
    rl-98c63ea=/usr/src/debug/perl-5.22.1-1 -fwrapv -fno-strict-aliasing -fstack-pro
    tector-strong -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -ggdb -O2 -pipe -Wimplici
    t-function-declaration -fdebug-prefix-map=/mnt/share/maint/perl.x86_64/build=/us
    r/src/debug/perl-5.22.1-1 -fdebug-prefix-map=/mnt/share/maint/perl.x86_64/src/pe
    rl-98c63ea=/usr/src/debug/perl-5.22.1-1 -fwrapv -fno-strict-aliasing -fstack-pro
    tector-strong -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map
    =/mnt/share/maint/perl.x86_64/build=/usr/src/debug/perl-5.22.1-2 -fdebug-prefix-
    map=/mnt/share/maint/perl.x86_64/src/perl-98c63ea=/usr/src/debug/perl-5.22.1-2 -
    fwrapv'
    ccversion='', gccversion='5.3.0', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doubleki
    nd=3
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdbl
    kind=3
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize
    =8
    alignbytes=8, prototype=define
    Linker and Libraries:
    ld='g++', ldflags =' -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,-
    -enable-auto-image-base -fstack-protector-strong -L/usr/local/lib'
    libpth=/usr/lib /usr/lib/../lib/../include/w32api /usr/local/lib /lib /usr/l
    ib /usr/lib/../lib/../include/w32api
    libs=-lpthread -ldb -ldl -lcrypt
    perllibs=-lpthread -ldl -lcrypt
    libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=cygperl5_22.dll
    gnulibc_version=''
    Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags=' --shared -Wl,--enable-auto-import -Wl,--export-
    all-symbols -Wl,--enable-auto-image-base -L/usr/local/lib -fstack-protector-stro
    ng'


    Characteristics of this binary (from libperl):
    Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
    PERL_DONT_CREATE_GVSV
    PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
    PERL_IMPLICIT_CONTEXT PERL_NEW_COPY_ON_WRITE
    PERL_PRESERVE_IVUV PERL_USE_SAFE_PUTENV
    USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS
    USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
    USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME
    USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API
    Built under cygwin
    Compiled at Mar 9 2016 22:37:56
    @INC:
    /usr/lib/perl5/site_perl/5.22/x86_64-cygwin-threads
    /usr/lib/perl5/site_perl/5.22
    /usr/lib/perl5/vendor_perl/5.22/x86_64-cygwin-threads
    /usr/lib/perl5/vendor_perl/5.22
    /usr/lib/perl5/5.22/x86_64-cygwin-threads
    /usr/lib/perl5/5.22
    .

    The result of install HTML::Form

    Running install for module 'HTML::Form'
    GAAS/HTML-Form-6.03.tar.gz
    Has already been unwrapped into directory /home/myuser/.local/share/.cp
    an/build/HTML-Form-6.03-87dqR1
    GAAS/HTML-Form-6.03.tar.gz
    Has already been prepared
    GAAS/HTML-Form-6.03.tar.gz
    Has already been made
    GAAS/HTML-Form-6.03.tar.gz
    Has already been tested successfully
    GAAS/HTML-Form-6.03.tar.gz
    Already done
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Apr 2009
    Posts
    2,232
    Rep Power
    1296
    I have not installed WWW::Mechanize myself, but I have heard from others that it can be a pain to install due to its large list of non core module dependencies.

    Since it's giving you problems, I'd probably suggest deleting everything in your build directory /home/myuser/.local/share/.cpan/build before proceeding.

    Then review the list of dependencies at CPAN dependencies and test results checker: WWW::Mechanize and install some of those first, starting with the ones that have the least dependencies of their own.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jul 2003
    Posts
    4,365
    Rep Power
    630
    I've done all that. I've installed WWW::Mechanize on several platforms many times with only occasional problems which I was easily able to resolve. This is the first time on cygwin. In any case this is just not worth the time and energy. I have switched to Python whose mechanize module was trivial to install. Thanks anyway.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.

IMN logo majestic logo threadwatch logo seochat tools logo