BenHopkins has asked for the wisdom of the Perl Monks concerning the following question:
When I run it from the command line, it outputs OK! When I run it as a cron job, it outputs this:lauxastst01:~/bin:cat test.pl #!/usr/bin/perl -w use strict; use Date::Manip qw(UnixDate); use XML::Twig; print "OK!\n";
It complains about Expat.so, which, I guess is required by Parser.pm, which, I guess is required by XML::Twig. Notice that I included a 'use' for Date::Manip before XML::Twig to show that it is not incapable of finding all modules, just that it can't find XML::Twig in the crontab environment. What gives?Can't load '/usr/local/perl/5.8.2/lib/site_perl/5.8.2/sun4-solaris/aut +o/XML/Parser/Expat/Expat.so' for module XML::Parser::Expat: ld.so.1: +perl: fatal: libexpat.so.0 : open failed: No such file or directory at /usr/local/perl/5.8.2/lib/ +5.8.2/sun4-solaris/DynaLoader.pm line 229. at /usr/local/perl/5.8.2/lib/site_perl/5.8.2/sun4-solaris/XML/Parser. +pm line 14 Compilation failed in require at /usr/local/perl/5.8.2/lib/site_perl/5 +.8.2/sun4-solaris/XML/Parser.pm line 14. BEGIN failed--compilation aborted at /usr/local/perl/5.8.2/lib/site_pe +rl/5.8.2/sun4-solaris/XML/Parser.pm line 18. Compilation failed in require at /usr/local/perl/5.8.2/lib/site_perl/5 +.8.2/XML/Twig.pm line 98. BEGIN failed--compilation aborted at /usr/local/perl/5.8.2/lib/site_pe +rl/5.8.2/XML/Twig.pm line 98. Compilation failed in require at ./test.pl line 4. BEGIN failed--compilation aborted at ./test.pl line 4.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Twig in a crontab?
by Fletch (Bishop) on Jan 31, 2008 at 04:48 UTC | |
by BenHopkins (Sexton) on Jan 31, 2008 at 05:56 UTC | |
by sids (Acolyte) on Jan 31, 2008 at 06:22 UTC | |
by BenHopkins (Sexton) on Jan 31, 2008 at 06:47 UTC | |
by MidLifeXis (Monsignor) on Jan 31, 2008 at 18:03 UTC | |
by BenHopkins (Sexton) on Jan 31, 2008 at 07:31 UTC | |
by Fletch (Bishop) on Jan 31, 2008 at 13:52 UTC | |
Re: Twig in a crontab?
by hipowls (Curate) on Jan 31, 2008 at 07:18 UTC | |
by Tanktalus (Canon) on Jan 31, 2008 at 23:11 UTC | |
Re: Twig in a crontab?
by TOD (Friar) on Jan 31, 2008 at 04:37 UTC |