Skip Menu |
 

This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id: 131313
Status: open
Priority: 0/
Queue: CPAN

People
Owner: Nobody in particular
Requestors: will [...] zyphon.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.51
Fixed in: (no value)



Subject: Use of uninitialized value / need a valid pathname in CPAN::FirstTime
Download (untitled) / with headers
text/plain 1.2k
Using Amazon Linux AMI release 2018.03, when I try to install cpanm (via ansible, inside of a docker bash shell, yeah I know) I get the attached and below error. Interestingly it doesn't seem to be nearly as upset when I do the same thing via ansible's ssh commands instead of locally via the bash shell, so maybe the root cause is a null path somewhere? ``` Use of uninitialized value $_[0] in substitution (s///) at /usr/share/perl5/File/Basename.pm line 341. fileparse(): need a valid pathname at /usr/share/perl5/CPAN/FirstTime.pm line 1354. ``` FYI `cpan --version` outputs ``` /usr/bin/cpan version 1.57 calling Getopt::Std::getopts (version 1.07 [paranoid]), running under Perl version 5.16.3. ``` These are the packages installed immediately prior to trying to install cpanminus: - perl - perl-core - perl-libwww-perl - perl-CGI - perl-Time-Piece - perl-DBI - perl-DBD-MySQL - perl-CPAN - perl-Env - perl-Test-Fatal - gmp-devel - gcc I am going to try just using the perl-App-cpanminus package instead, but the error was such an oddball and my environment is so clean/reproducable I figured it's a good thing to report, because if I didn't have alternatives I'd really be stuck right now.
Subject: err.txt
Download err.txt
text/plain 18.6k

Message body is not shown because it is too large.

Download (untitled) / with headers
text/plain 748b
On 2019-12-31 18:20:17, will@zyphon.com wrote: Show quoted text
> Using Amazon Linux AMI release 2018.03, when I try to install cpanm > (via ansible, inside of a docker bash shell, yeah I know) I get the > attached and below error. Interestingly it doesn't seem to be nearly > as upset when I do the same thing via ansible's ssh commands instead > of locally via the bash shell, so maybe the root cause is a null path > somewhere? > > ``` > Use of uninitialized value $_[0] in substitution (s///) at > /usr/share/perl5/File/Basename.pm line 341. > fileparse(): need a valid pathname at > /usr/share/perl5/CPAN/FirstTime.pm line 1354. > ```
Just an idea --- maybe the user's shell could not be detected? Would it help if SHELL=/bin/sh was set before running cpan?
Download (untitled) / with headers
text/plain 381b
Thanks for your report, Will. And Thanks for your suggestion, Slaven. Other ideas to try: (1) replace cpan App::cpanminus with perl -MCPAN -e 'install App::cpanminus' (2) Upgrade before using CPAN.pm; you could try perl -MCPAN -e shell And in the shell you could say upgrade CPAN App::Cpan (3) Upgrade even more; you could try perl -MCPAN -e upgrade


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.