gg48gg has asked for the wisdom of the Perl Monks concerning the following question:

Trying to insall pretty much any module and having issues. This is a new install of RHEL7. Here is an example of trying to install IO::Prompt. Thanks in advance for your help.
root@mwuxadmdr1:/root/.cpan/build/Want-0.25-4nSUJ9 $ cpan -i IO::Prompt Reading '/root/.cpan/Metadata' Database was generated on Mon, 30 Mar 2015 03:29:01 GMT Running install for module 'IO::Prompt' Running make for D/DC/DCONWAY/IO-Prompt-0.997002.tar.gz Checksum for /root/.cpan/sources/authors/id/D/DC/DCONWAY/IO-Prompt-0.9 +97002.tar.gz ok CPAN.pm: Building D/DC/DCONWAY/IO-Prompt-0.997002.tar.gz Created MYMETA.yml and MYMETA.json Creating new 'Build' script for 'IO-Prompt' version '0.997002' Building IO-Prompt DCONWAY/IO-Prompt-0.997002.tar.gz ./Build -- OK Running Build test t/00.load.t .......... 1/1 # Failed test 'use IO::Prompt;' # at t/00.load.t line 4. # Tried to use 'IO::Prompt'. # Error: Can't locate loadable object for module Want in @INC (@I +NC contains: /root/.cpan/build/IO-Prompt-0.997002-bPjKIQ/blib/lib /ro +ot/.cpan/build/IO-Prompt-0.997002-bPjKIQ/blib/arch /usr/local/lib64/p +erl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/p +erl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /root/.cpan/ +build/IO-Prompt-0.997002-bPjKIQ/blib/lib/IO/Prompt.pm line 197. # Compilation failed in require at /root/.cpan/build/IO-Prompt-0.99700 +2-bPjKIQ/blib/lib/IO/Prompt.pm line 197. # BEGIN failed--compilation aborted at /root/.cpan/build/IO-Prompt-0.9 +97002-bPjKIQ/blib/lib/IO/Prompt.pm line 197. # Compilation failed in require at (eval 4) line 2. # BEGIN failed--compilation aborted at (eval 4) line 2. Use of uninitialized value $IO::Prompt::VERSION in concatenation (.) o +r string at t/00.load.t line 7. # Testing IO::Prompt # Looks like you failed 1 test of 1. t/00.load.t .......... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests t/01.dependencies.t .. ok t/pod-coverage.t ..... skipped: Test::Pod::Coverage 1.04 required for +testing POD coverage t/pod.t .............. skipped: Test::Pod 1.14 required for testing PO +D Test Summary Report ------------------- t/00.load.t (Wstat: 256 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 1 Files=4, Tests=3, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.09 cusr + 0.02 csys = 0.14 CPU) Result: FAIL Failed 1/4 test programs. 1/3 subtests failed. DCONWAY/IO-Prompt-0.997002.tar.gz ./Build test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports DCONWAY/IO-Prompt-0.997002.tar.gz Running Build install make test had returned bad status, won't install without force root@mwuxadmdr1:/root/.cpan/build/Want-0.25-4nSUJ9 $ cpan -i Want Reading '/root/.cpan/Metadata' Database was generated on Mon, 30 Mar 2015 03:29:01 GMT Want is up to date (0.25). root@mwuxadmdr1:/root/.cpan/build/Want-0.25-4nSUJ9 $ perl -V Summary of my perl5 (revision 5 version 16 subversion 3) configuration +: Platform: osname=linux, osvers=2.6.32-504.1.3.el6.x86_64, archname=x86_64-li +nux-thread-multi uname='linux x86-020.build.eng.bos.redhat.com 2.6.32-504.1.3.el6.x +86_64 #1 smp fri oct 31 11:37:10 edt 2014 x86_64 x86_64 x86_64 gnulin +ux ' config_args='-des -Doptimize=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOU +RCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 + -grecord-gcc-switches -m64 -mtune=generic -Dccdlflags=-Wl,--enable +-new-dtags -Dlddlflags=-shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOUR +CE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 +-grecord-gcc-switches -m64 -mtune=generic -Wl,-z,relro -DDEBUGGING +=-g -Dversion=5.16.3 -Dmyhostname=localhost -Dperladmin=root@localhos +t -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dprefix=/usr -Dvendorprefix=/usr -D +siteprefix=/usr/local -Dsitelib=/usr/local/share/perl5 -Dsitearch=/us +r/local/lib64/perl5 -Dprivlib=/usr/share/perl5 -Dvendorlib=/usr/share +/perl5/vendor_perl -Darchlib=/usr/lib64/perl5 -Dvendorarch=/usr/lib64 +/perl5/vendor_perl -Darchname=x86_64-linux-thread-multi -Dlibpth=/usr +/local/lib64 /lib64 /usr/lib64 -Duseshrplib -Dusethreads -Duseithread +s -Dusedtrace=/usr/bin/dtrace -Duselargefiles -Dd_semctl_semun -Di_db + -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -D +installusrbinperl=n -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/le +ss -isr -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_ +r_proto -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto -Ud_endserven +t_r_proto -Ud_setservent_r_proto -Dscriptdir=/usr/bin -Dusesitecustom +ize' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=und +ef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasin +g -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D +_FILE_OFFSET_BITS=64', optimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions +-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switc +hes -m64 -mtune=generic', cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -f +stack-protector -I/usr/local/include' ccversion='', gccversion='4.8.3 20140911 (Red Hat 4.8.3-7)', gccos +andvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +6 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='gcc', ldflags =' -fstack-protector' libpth=/usr/local/lib64 /lib64 /usr/lib64 libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread +-lc -lgdbm_compat perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='2.17' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,--en +able-new-dtags -Wl,-rpath,/usr/lib64/perl5/CORE' cccdlflags='-fPIC', lddlflags='-shared -O2 -g -pipe -Wall -Wp,-D_F +ORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buf +fer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,relro ' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_PRESERVE_IVUV 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_PERLIO USE_PERL_ATOF USE_REENTRANT_API USE_SITECUSTOMIZE Locally applied patches: Fedora Patch1: Removes date check, Fedora/RHEL specific Fedora Patch3: support for libdir64 Fedora Patch4: use libresolv instead of libbind Fedora Patch5: USE_MM_LD_RUN_PATH Fedora Patch6: Skip hostname tests, due to builders not being +network capable Fedora Patch7: Dont run one io test due to random builder fail +ures Fedora Patch9: Fix find2perl to translate ? glob properly (RT# +113054) Fedora Patch10: Fix broken atof (RT#109318) Fedora Patch13: Clear $@ before "do" I/O error (RT#113730) Fedora Patch14: Do not truncate syscall() return value to 32 b +its (RT#113980) Fedora Patch15: Override the Pod::Simple::parse_file (CPANRT#7 +7530) Fedora Patch16: Do not leak with attribute on my variable (RT# +114764) Fedora Patch17: Allow operator after numeric keyword argument +(RT#105924) Fedora Patch18: Extend stack in File::Glob::glob, (RT#114984) Fedora Patch19: Do not crash when vivifying $| Fedora Patch20: Fix misparsing of maketext strings (CVE-2012-6 +329) Fedora Patch21: Add NAME headings to CPAN modules (CPANRT#7339 +6) Fedora Patch22: Fix leaking tied hashes (RT#107000) [1] Fedora Patch23: Fix leaking tied hashes (RT#107000) [2] Fedora Patch24: Fix leaking tied hashes (RT#107000) [3] Fedora Patch25: Fix dead lock in PerlIO after fork from thread + (RT#106212) Fedora Patch26: Make regexp safe in a signal handler (RT#11487 +8) Fedora Patch27: Update h2ph(1) documentation (RT#117647) Fedora Patch28: Update pod2html(1) documentation (RT#117623) Fedora Patch29: Document Math::BigInt::CalcEmu requires Math:: +BigInt (CPAN RT#85015) RHEL Patch30: Use stronger algorithm needed for FIPS in t/op/c +rypt.t (RT#121591) RHEL Patch31: Make *DBM_File desctructors thread-safe (RT#6191 +2) RHEL Patch32: Use stronger algorithm needed for FIPS in t/op/t +aint.t (RT#123338) Built under linux Compiled at Dec 1 2014 11:16:58 %ENV: PERL_MB_OPT="--install_base "/root/perl5"" PERL_MM_OPT="INSTALL_BASE=/root/perl5" @INC: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . root@mwuxadmdr1:/root/.cpan/build/Want-0.25-4nSUJ9 $ cpan Terminal does not support AddHistory. cpan shell -- CPAN exploration and modules installation (v1.9800) Enter 'h' for help. cpan[1]> o conf $CPAN::Config options from /root/.cpan/CPAN/MyConfig.pm: commit [Commit changes to disk] defaults [Reload defaults from disk] help [Short help about 'o conf' usage] init [Interactive setting of all options] applypatch [] auto_commit [0] build_cache [100] build_dir [/root/.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 [/root/.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 [/usr/bin/gpg] gzip [/usr/bin/gzip] halt_on_failure [0] histfile [/root/.cpan/histfile] histsize [100] http_proxy [] inactivity_timeout [0] index_expire [1] inhibit_startup_message [0] keep_source_where [/root/.cpan/sources] load_module_verbosity [none] lynx undef make [/usr/bin/make] make_arg [] make_install_arg [] make_install_make_command [/usr/bin/make] makepl_arg [] mbuild_arg [] mbuild_install_arg [] mbuild_install_build_command [./Build] mbuildpl_arg [] ncftp undef ncftpget undef no_proxy [] pager [/usr/bin/less] password undef patch [/usr/bin/patch] patches_dir undef perl5lib_verbosity [none] prefer_external_tar [1] prefer_installer [MB] prefs_dir [/root/.cpan/prefs] prerequisites_policy [follow] proxy_pass undef proxy_user undef randomize_urllist undef scan_cache [atstart] shell [/bin/bash] show_unparsable_versions [0] show_upload_date [0] show_zero_versions [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 [http://cpan.netnitco.net/] 1 [http://httpupdate3.cpanel.net/CPAN/] 2 [http://mirror.nyi.net/pub/CPAN/] use_sqlite [0] username undef version_timeout [15] wait_list undef wget [/usr/bin/wget] yaml_load_code [0] yaml_module [YAML] cpan[2]> q Terminal does not support GetHistory. Lockfile removed.

Replies are listed 'Best First'.
Re: cpan issues on 5.16
by ikegami (Patriarch) on Mar 30, 2015 at 21:53 UTC

    Want is up to date (0.25) just means that cpan found the .pm and found its version to the latest. It doesn't run any tests. It doesn't even try to load the module.

    The first error you got indicated that the module is improperly installed. Specifically, the compiled component of the module is missing.

    I suspect that Want is not installed at all. cpan simply found the Want.pm in the current directory.

    The solution: Change directory to one that doesn't contain Want.pm.

Re: cpan issues on 5.16
by jeffa (Bishop) on Mar 30, 2015 at 22:11 UTC

    I recommend you take this opportunity to stop what you are doing and instead try the following:

    $ \curl -L http://install.perlbrew.pl | bash $ source ~/perl5/perlbrew/etc/bashrc $ perlbrew install perl-5.16.3 $ perlbrew switch perl-5.16.3 $ perlbrew install-cpanm $ cpanm IO::Prompt

    Why? Perlbrew allows you to install versions of Perl that are separate from the system Perl that comes with the RedHat distro. You can install it for a non-privileged user without having to depend upon your system administrator. Even if you do have root access, perlbrew keeps your CPAN installations away from what your Red Hat OS needs and uses. Be sure and read the documentation, but just an extra 10 minutes now can save you weeks in the future. Good luck!

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    
      Makes sense, and may be the way I go. I have played around with perlbrew before, and it has confused me. I guess I need to better understand perlbrew and how to switch between the systems's perl, and perlbrew, and how to control what perl automated scripts (e.g. via cron) will use. I would also like to understand if the issues I am seeing with cpan are related to version 5.16.3, versus perl 5.10 which I am more experienced with. Additionally, I am specifically needing perl-rrdtool and have not found it for RHEL7, so I may end up installing RHEL6 which comes with perl 5.10 AFAIK.