October 15th, 2003, 09:13 AM
error with running a python program from crontab
I can run the prog.py (I have an extension module in C and its compile .so file is stored in the same dir as this program prog.py file) correctly at cml (that means no problem with loading my own module), then I wrote a C wrapper (also in the same dir) to start it at the crontab. My crontab line says:
0-59/5 * * * * cd $HOME/minijupe/crawl;LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/wu/local/lib $HOME/minijupe/crawl/pywrapper >> $HOME/minijupe/crawl/.log20031014 2>&1
which sets the extra LD_LIBRARY_PATH for my local gcc-3.3.1 build. But I still get such a libgcc error as follows:
Traceback (most recent call last):
File "PWD=/home/wu/minijupe/crawl", line 30, in ?
ImportError: libgcc_s.so.1: cannot open shared object file: No such file or directory
When I remove the "LD_..." part in my crontab row, the error is not removed.
I checked the file libgcc_s.so.1 and it IS in the directory /home/wu/local/lib.
Anyone knows what the matter is? Thanks!
October 15th, 2003, 10:21 AM
I'm pretty new to both *nix and C/C++.. Anyway the error your getting means that Python can't import 'libgcc_s.so.1', where abouts on your system is it? I'm guessing that your program works fine (just not under cron)?
If your just having problems running it from cron.. maybe one of the *nix forums would be a good place to ask?
It's an interesting problem.. Sorry, i guess i'm not helping
October 16th, 2003, 04:52 AM
Also made a post on the linux board, no new answers yet.
October 16th, 2003, 08:53 AM
thats cool, well when you find out whats wrong with it let us know . Oh you might also want to do a search on comp.lang.python.. It's possible somone theres had this/a similar problem before