Re: perlbrew and modules
> On Dec 7, 2017, at 3:39 PM, Andy Bach wrote: > > meaning, you added: > use lib q{/home/user/.cpanm/}; Well, no. That one didn't work. I had to be specific about where CGI::Carp was installed to get it to work: use lib '/home/user/.cpanm/work/1512448551.26554/CGI-4.38/lib'; > Right, so that's your 500 error. But you added the same line in the original > (before the use Carp line?) and it *didn't* fix the problem? Can you sym > link the .cpanm dir under one of those @INC dirs. Hm, there's also an > PERL5LIB env var you can set to add libraries (maybe in the webserver config). I've read about those, but I'd rather not jerry rig this install just to get it to work. I've been using perlbrew on my Mac (with 5 different perls) for years without incident, so that's why I'm at a loss as to what's happening on this VPS. Maybe I should just cut my losses, delete everything, and start over. I just hate doing that after spending so much time on something. It's like admitting defeat and giving up. ;) I just thought to compare the install on my Mac with the one on the VPS and the binaries of perlbrew are exactly the same, but the binaries for patchperl and cpanm are wildly different from each other. Are these customized during installation for the platform that running? If not, would it be safe to copy my known good copies over to the server (Mac vs Linux)? Frank -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: perlbrew and modules
>> I found a .cpanm directory in /home/user where all the modules are >> being installed. Could that have anything to do with it? I tried adding >> that directory with "use lib" but I still get the 500 error. > I ran your script and, when I manually include the .cpanm directory, it returns: /home/user/cgi-bin/test.pl syntax OK meaning, you added: use lib q{/home/user/.cpanm/}; > otherwise, it returns: Can't locate CGI/Carp.pm in @INC (you may need to install the CGI::Carp module) (@INC contains: /home/user/perl5/perlbrew/ perls/perl-5.26.1/lib/site_perl/5.26.1/x86_64-linux /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1 /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1/x86_64-linux /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1) at /home/user/cgi-bin/test.pl line 9. BEGIN failed--compilation aborted at /home/user/cgi-bin/test.pl line 9. Right, so that's your 500 error. But you added the same line in the original (before the use Carp line?) and it *didn't* fix the problem? Can you sym link the .cpanm dir under one of those @INC dirs. Hm, there's also an PERL5LIB env var you can set to add libraries (maybe in the webserver config). On Thu, Dec 7, 2017 at 5:29 PM, SSC_perl wrote: > > On Dec 7, 2017, at 3:09 PM, Andy Bach wrote: > > > > Can you not look a the web server's error_log? A 500 error would put > the perl error msg in there. Have you tried just "use" a different module? > > Those errors aren't appearing in the errors log in cPanel. I > couldn't find another error log in WHM. > > > Hmm, can you try... > > I ran your script and, when I manually include the .cpanm > directory, it returns: > > /home/user/cgi-bin/test.pl syntax OK > > otherwise, it returns: > > Can't locate CGI/Carp.pm in @INC (you may need to install the CGI::Carp > module) (@INC contains: /home/user/perl5/perlbrew/ > perls/perl-5.26.1/lib/site_perl/5.26.1/x86_64-linux > /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1 > /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1/x86_64-linux > /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1) at > /home/user/cgi-bin/test.pl line 9. BEGIN failed--compilation aborted at > /home/user/cgi-bin/test.pl line 9. > > > Here's more info. I ran the following command, which produced an > error: > > > perlbrew exec perl -e 'print $]' > Use of uninitialized value in list assignment at > /home/user/perl5/perlbrew/bin/perlbrew line 2220. > perl-5.26.1 > == > 5.026001 > > Looks like this has been reported for a few years without a > solution: > > https://rt.cpan.org/Public/Bug/Display.html?id=111978 > > Could this be part of the problem? I'm running perlbrew 0.80. > > Frank > > P.S. Re-installing cpanm didn't solve the problem. -- a Andy Bach, afb...@gmail.com 608 658-1890 cell 608 261-5738 wk
Re: perlbrew and modules
> On Dec 7, 2017, at 3:09 PM, Andy Bach wrote: > > Can you not look a the web server's error_log? A 500 error would put the > perl error msg in there. Have you tried just "use" a different module? Those errors aren't appearing in the errors log in cPanel. I couldn't find another error log in WHM. > Hmm, can you try... I ran your script and, when I manually include the .cpanm directory, it returns: /home/user/cgi-bin/test.pl syntax OK otherwise, it returns: Can't locate CGI/Carp.pm in @INC (you may need to install the CGI::Carp module) (@INC contains: /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1/x86_64-linux /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1 /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1/x86_64-linux /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1) at /home/user/cgi-bin/test.pl line 9. BEGIN failed--compilation aborted at /home/user/cgi-bin/test.pl line 9. Here's more info. I ran the following command, which produced an error: > perlbrew exec perl -e 'print $]' Use of uninitialized value in list assignment at /home/user/perl5/perlbrew/bin/perlbrew line 2220. perl-5.26.1 == 5.026001 Looks like this has been reported for a few years without a solution: https://rt.cpan.org/Public/Bug/Display.html?id=111978 Could this be part of the problem? I'm running perlbrew 0.80. Frank P.S. Re-installing cpanm didn't solve the problem. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: perlbrew and modules
> I've run into another strange problem that I don't understand. > Running the script below produces the output "Perl v5.26.1". However, if I > add the line: use CGI::Carp qw(fatalsToBrowser); it produces a 500 error. > > On the shared server, this worked as it should, with > 'fatalsToBrowser' showing any errors. Can you not look a the web server's error_log? A 500 error would put the perl error msg in there. Have you tried just "use" a different module? Hmm, can you try #!/home/user/perl5/perlbrew/perls/latest/bin/perl use v5.26; use warnings; use diagnostics; print "Content-type: text/html\n\n"; print `/home/user/perl5/perlbrew/perls/latest/bin/perl -c /path/to/my/cgi-bin/file 2>&1` , "\n"; in a different file? a On Thu, Dec 7, 2017 at 1:50 PM, SSC_perl wrote: > I've run into another strange problem that I don't understand. > Running the script below produces the output "Perl v5.26.1". However, if I > add the line: use CGI::Carp qw(fatalsToBrowser); it produces a 500 error. > > On the shared server, this worked as it should, with > 'fatalsToBrowser' showing any errors. But the VPS is just backwards - > adding it crashes the script! This actually happens with any module and, > yes, they are installed: > > > cpanm install CGI::Carp > install is up to date. (0.01) > CGI::Carp is up to date. (4.38) > > I have been fighting with this VPS setup for almost 2 weeks now > just to get a functioning modern Perl environment and I'm about at my wits > end. It shouldn't be this hard. > > I'd appreciate any help. > > Thanks, > Frank > > > > > #!/home/user/perl5/perlbrew/perls/latest/bin/perl > > use v5.26; > use warnings; > use diagnostics; > > print "Content-type: text/html\n\n"; > say 'Perl '. $^V; > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > > -- a Andy Bach, afb...@gmail.com 608 658-1890 cell 608 261-5738 wk
Re: perlbrew and modules
> On Dec 7, 2017, at 1:40 PM, Shlomi Fish wrote: > > you should make sure that the modules you wish to use are in one of the > dirs in @INC. cpanm should install to the global directories. Another question. How can I check to make sure cpanm was installed properly under perlbrew? Frank -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: perlbrew and modules
> On Dec 7, 2017, at 1:40 PM, Shlomi Fish wrote: > > you should make sure that the modules you wish to use are in one of the > dirs in @INC. cpanm should install to the global directories. That's what I thought. Shouldn't "cpanm install Module::Name" do that on it's own? There's only one perl install and one alias, and the alias is selected. Running "perl -v" returns version 5.26.1 so how can I get perlbrew set to install in the current installation? Frank -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: perlbrew and modules
On Thu, 7 Dec 2017 12:44:51 -0800 SSC_perl wrote: > > On Dec 7, 2017, at 12:04 PM, Shlomi Fish wrote: > > > > What does: > > > > say "@INC"; > > > > say if you add it to the script? > > I get: > > /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1/x86_64-linux > /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1 > /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1/x86_64-linux > /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1 > > I found a .cpanm directory in /home/user where all the modules are > being installed. Could that have anything to do with it? I tried adding > that directory with "use lib" but I still get the 500 error. > you should make sure that the modules you wish to use are in one of the dirs in @INC. cpanm should install to the global directories. > Thanks, > Frank -- - Shlomi Fish http://www.shlomifish.org/ https://youtu.be/GoEn1YfYTBM - Tiffany Alvord - “Fall Together” Writing your own nirvana may be easier than writing a good blog engine ;) — http://is.gd/3Hh82T Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: perlbrew and modules
> On Dec 7, 2017, at 12:04 PM, Shlomi Fish wrote: > > What does: > > say "@INC"; > > say if you add it to the script? I get: /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1/x86_64-linux /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1 /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1/x86_64-linux /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1 I found a .cpanm directory in /home/user where all the modules are being installed. Could that have anything to do with it? I tried adding that directory with "use lib" but I still get the 500 error. Thanks, Frank -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: perlbrew and modules
On Thu, 7 Dec 2017 11:50:17 -0800 SSC_perl wrote: > I've run into another strange problem that I don't understand. > Running the script below produces the output "Perl v5.26.1". However, if I > add the line: use CGI::Carp qw(fatalsToBrowser); it produces a 500 error. > > On the shared server, this worked as it should, with > 'fatalsToBrowser' showing any errors. But the VPS is just backwards - adding > it crashes the script! This actually happens with any module and, yes, they > are installed: > > > cpanm install CGI::Carp > install is up to date. (0.01) > CGI::Carp is up to date. (4.38) > > I have been fighting with this VPS setup for almost 2 weeks now just > to get a functioning modern Perl environment and I'm about at my wits end. > It shouldn't be this hard. > > I'd appreciate any help. > > Thanks, > Frank > > > > > #!/home/user/perl5/perlbrew/perls/latest/bin/perl > > use v5.26; > use warnings; > use diagnostics; > > print "Content-type: text/html\n\n"; > say 'Perl '. $^V; Hi Frank! What does: say "@INC"; say if you add it to the script? -- - Shlomi Fish http://www.shlomifish.org/ The Case for File Swapping - http://shlom.in/file-swap Real men don’t listen to sentences that start with “Real men don’t”. — http://whatsup.org.il/article/6023 Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
perlbrew and modules
I've run into another strange problem that I don't understand. Running the script below produces the output "Perl v5.26.1". However, if I add the line: use CGI::Carp qw(fatalsToBrowser); it produces a 500 error. On the shared server, this worked as it should, with 'fatalsToBrowser' showing any errors. But the VPS is just backwards - adding it crashes the script! This actually happens with any module and, yes, they are installed: > cpanm install CGI::Carp install is up to date. (0.01) CGI::Carp is up to date. (4.38) I have been fighting with this VPS setup for almost 2 weeks now just to get a functioning modern Perl environment and I'm about at my wits end. It shouldn't be this hard. I'd appreciate any help. Thanks, Frank #!/home/user/perl5/perlbrew/perls/latest/bin/perl use v5.26; use warnings; use diagnostics; print "Content-type: text/html\n\n"; say 'Perl '. $^V; -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/