Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Perl app won't compile /run from cron

by dazz (Beadle)
on May 25, 2018 at 08:35 UTC ( [id://1215199]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl app won't compile /run from cron
in thread Perl app won't compile /run from cron

Hi I tried  perldoc -l Image::Grab but I don't have perldoc installed.
I am not using local::lib.
I used the cron commmand
* * * * * /usr/bin/perl /home/user/perl_script.pl 1 2>&1 | /usr/bin/ +logger -t test_cron
to get the compiler error output from syslog.

Dazz

Replies are listed 'Best First'.
Re^3: Perl app won't compile /run from cron
by haukex (Archbishop) on May 25, 2018 at 12:17 UTC
    I am not using local::lib.

    Based on the pathname ~/perl5/lib/perl5 and that you say you used cpan to install the module, I'm pretty sure you are using local::lib. The cpan client, when run without sudo, will usually detect that it doesn't have permissions to write to the system directories and autoconfigure to use local::lib. If you check your .profile or .bashrc files, you should see variables like PERL_LOCAL_LIB_ROOT and PERL5LIB being set there, these would have been added there by local::lib, and as I said those are the variables that are probably missing from the environment that cron provides, hence my suggestion to try and set PERL5LIB explicitly.

    I tried perldoc -l Image::Grab but I don't have perldoc installed.

    Well, you could do sudo apt-get install perl-doc, but did you try dave_the_m's suggestion, which should work even without perldoc? I also made a few other suggestions and asked a few questions above as well as here.

Re^3: Perl app won't compile /run from cron
by hippo (Bishop) on May 25, 2018 at 09:56 UTC
    I tried perldoc -l Image::Grab but I don't have perldoc installed.
    locate Image/Grab.pm

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1215199]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2024-04-23 12:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found