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

Hi The problem I have is exactly the same as this link
https://stackoverflow.com/questions/17194632/perl-cant-find-module-when-run-from-cron-daily
I have found the Image::Grab module at
~/perl5/lib/perl5/Image
The directory:
:/usr/lib/perl5
is empty and so is
:/usr $ ls lib/perl5/
I am running Rasbian on a Raspberry Pi. I don't know what files are supposed to be where.

Dazz

Replies are listed 'Best First'.
Re^2: Perl app won't compile /run from cron
by haukex (Archbishop) on May 24, 2018 at 10:05 UTC

    Sounds like the module was installed with local::lib, which should normally set its environment variables in .profile/.bashrc. Anyway, did you try the solutions suggested in that link? For example prepending PERL5LIB=/home/pi/perl5/lib/perl5 to the command in your crontab?

      Hi
      The "missing" modules were installed with CPAN that has chosen to put them in my home dir.

      Dazz
Re^2: Perl app won't compile /run from cron
by marto (Cardinal) on May 24, 2018 at 09:46 UTC