sunshine_august has asked for the wisdom of the Perl Monks concerning the following question:
I try to use threads in my project, and I have installed threads to my own local lib directory in my project directory, when I try to run the script in 64bit box, It throws error msg like these:
and I have add the lib directory by "use lib"like this:Can't load '/home/larry/project/sysmonitor/lib/perl5/5.8.5/i386-linux- +thread-multi/auto/threads/threads.so' for module threads: /home/larry +/project/sysmonitor/lib/perl5/5.8.5/i386-linux-thread-multi/auto/thre +ads/threads.so: cannot open shared object file: No such file or direc +tory at /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/XSLoader.pm +line 68. at /home/larry/project/sysmonitor/lib/perl5/5.8.5/i386-linux-thread-m +ulti/threads.pm line 32 Compilation failed in require at ./monitorSrv.pl line 47. BEGIN failed--compilation aborted at ./monitorSrv.pl line 47.
And I check the threads.so, It is laid on where it should be:use strict; use warnings; #use diagnostics; use FindBin; use lib "$FindBin::Bin/lib64/perl5/5.8.5/x86_64-linux-thread-multi"; use lib "$FindBin::Bin/lib64/perl5/5.8.5/x86_64-linux-thread-multi/au +to"; use lib "$FindBin::Bin/lib64/perl5/site_perl/5.8.5"; use lib "$FindBin::Bin/lib64/perl5/site_perl/5.8.5/auto"; use lib "$FindBin::Bin/lib64/perl5/site_perl/5.8.5/x86_64-linux-threa +d-multi"; use lib "$FindBin::Bin/lib64/perl5/site_perl/5.8.5/x86_64-linux-threa +d-multi/auto"; use lib "$FindBin::Bin/lib/perl5/5.8.5/i386-linux-thread-multi"; use lib "$FindBin::Bin/lib/perl5/5.8.5/i386-linux-thread-multi/auto"; use lib "$FindBin::Bin/lib/perl5/site_perl/5.8.5"; use lib "$FindBin::Bin/lib/perl5/site_perl/5.8.5/auto"; use lib "$FindBin::Bin/lib/perl5/site_perl/5.8.5/i386-linux-thread-mu +lti"; use lib "$FindBin::Bin/lib/perl5/site_perl/5.8.5/i386-linux-thread-mu +lti/auto";
Because, I sometimes test my script at 32 bit box, sometimes 64bit, so I install both arch threads, and I check their location:[larry@localhost sysmonitor]$ ll /home/larry/project/sysmonitor/lib/pe +rl5/5.8.5/i386-linux-thread-multi/auto/threads/threads.so -rwxrwxr-x 1 larry larry 110977 Sep 27 16:46 /home/larry/project/sysm +onitor/lib/perl5/5.8.5/i386-linux-thread-multi/auto/threads/threads.s +o
I guess may be this is the evil that cause the problem./home/larry/project/sysmonitor/lib64/perl5/5.8.5/x86_64-linux-thread-m +ulti/threads.pm /home/larry/project/sysmonitor/lib/perl5/5.8.5/i386-linux-thread-multi +/threads.pm
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can't load threads.so error
by chromatic (Archbishop) on Sep 27, 2008 at 17:12 UTC | |
by sunshine_august (Scribe) on Sep 28, 2008 at 01:43 UTC | |
|
Re: Can't load threads.so error
by sunshine_august (Scribe) on Sep 28, 2008 at 06:01 UTC |