I installed ImageMagick+perl on my osx machine. It runs great from the shell with no errors. I have added a job to my crontab and the script fails saying "Image::Magick" is not found.

To find out where it is installed i shell "perldoc -l Image::Magick"
and get this "/opt/local/lib/perl5/site_perl/5.8.9/darwin-2level/"

so at the top of my perl script i add this...
use lib "/opt/local/lib/perl5/site_perl/5.8.9/darwin-2level/"

Still no luck.

Error is below

Can't load '/opt/local/lib/perl5/site_perl/5.8.9/darwin-2level//auto/I +mage/Magick/Magick.bundle' for module Image::Magick: dlopen(/opt/loca +l/lib/perl5/site_perl/5.8.9/darwin-2level//auto/Image/Magick/Magick.b +undle, 1): Symbol not found: _PL_curpad Referenced from: /opt/local/lib/perl5/site_perl/5.8.9/darwin-2level/ +/auto/Image/Magick/Magick.bundle Expected in: dynamic lookup at /Users/jtrue/wallpaper/cal.pl line 15 Compilation failed in require at /Users/jtrue/wallpaper/cal.pl line 15 +. BEGIN failed--compilation aborted at /Users/jtrue/wallpaper/cal.pl lin +e 15. &Image::Magick::constant not defined. The required ImageMagick librari +es are not installed or not installed properly. END failed--call queue aborted at /Users/jtrue/wallpaper/cal.pl line 1 +5.

Finally, i copied all of my @INC paths when run from shell and added each path manually (with a seperate use lib "PATH/HERE"; statement and it still fails.

Anyone have any ideas or suggestions?

P.S. My cron job is not run as root (i'd rather not do this).

jtrue

In reply to Cron can't find a module in OSX by true

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.