Home > Archive > PERL Beginners > March 2005 > problem with using a module just recently installed
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
problem with using a module just recently installed
|
|
| Nelson Tong 2005-03-25, 8:56 am |
| HI,
I am having a problem of using a module recently installed and just
can't quite figure out a solution. I installed 'Cache::FastMmap'
using -MCPAN, and made @INC contains the directory where I have
installed the module (eg.
..../.cpan/build/Cache-FastMmap-1.09/blib/lib/).
When I use perldoc:
perldoc 'Cache::FastMmap' and perldoc 'Cache::FastMmap::CImpl'
the documents installed appear which supposingly mean both modules
must have been installed properly. But when I test the module by
using:
perl -e 'use Cache::FastMmap'
error came up which says:
Can't locate loadable object for module Cache::FastMmap::CImpl in @INC
(@INC contains: ....) at
..../.cpan/build/Cache-FastMmap-1.09/blib/lib/Cache/FastMmap.pm line
217
The Cache::FastMmap::CImpl clearly is there in the directory because
it it is not, perldoc wouldn't have been able to locate it with @INC (
I also double checked to make sure @INC contains the dirctory
'.../.cpan/build/Cache-FastMmap-1.09/blib/lib/' under which both
Cache::FastMmap::CImpl and Cache::FastMmap live) . How come this error
occurs?
| |
| Zentara 2005-03-25, 3:56 pm |
| On Thu, 24 Mar 2005 22:48:44 -0500, nelsonstong@gmail.com (Nelson Tong)
wrote:
>perl -e 'use Cache::FastMmap'
>
>error came up which says:
>
>Can't locate loadable object for module Cache::FastMmap::CImpl in @INC
>(@INC contains: ....) at
>.../.cpan/build/Cache-FastMmap-1.09/blib/lib/Cache/FastMmap.pm line
>217
>
>The Cache::FastMmap::CImpl clearly is there in the directory because
>it it is not, perldoc wouldn't have been able to locate it with @INC (
>I also double checked to make sure @INC contains the dirctory
>'.../.cpan/build/Cache-FastMmap-1.09/blib/lib/' under which both
>Cache::FastMmap::CImpl and Cache::FastMmap live) . How come this error
>occurs?
The "Can't locate loadable object" means that it can't find the
..so compiled c component. So either you didn't compile the
module properly, you have incompatible binary versions, or
so permissions problem.
In the directory where the Cache::FastMmap::CImpl module is,
go up 2 directories to where the main Cache dir is. At that same
directory level, there should be a directory called "auto".
Go into auto/Cache/FastMmap/Clmpl and see if there is a file called
CImpl.so, that is the file that it can't load.
You can try to rebuild the module manually, and see if you are
given error messages. Something could be amiss, like the if
you have a perl, which was precompiled with a different compiler
or library versions.
You can also run
strace perl -e 'use Cache::FastMmap'
and see exactly where the problem is.
--
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html
| |
| Nelson Tong 2005-03-30, 3:56 pm |
| zentara wrote:
>On Thu, 24 Mar 2005 22:48:44 -0500, nelsonstong@gmail.com (Nelson Tong)
>wrote:
>
>
>
>
>The "Can't locate loadable object" means that it can't find the
>.so compiled c component. So either you didn't compile the
>module properly, you have incompatible binary versions, or
>so permissions problem.
>
>In the directory where the Cache::FastMmap::CImpl module is,
>go up 2 directories to where the main Cache dir is. At that same
>directory level, there should be a directory called "auto".
>
>Go into auto/Cache/FastMmap/Clmpl and see if there is a file called
>CImpl.so, that is the file that it can't load.
>
>You can try to rebuild the module manually, and see if you are
>given error messages. Something could be amiss, like the if
>you have a perl, which was precompiled with a different compiler
>or library versions.
>
>You can also run
> strace perl -e 'use Cache::FastMmap'
>
>and see exactly where the problem is.
>
I found out why the error occurs. All this time, I had been using the
the wrong directory to be included in @INC
(".cpan/build/Cache-FastMmap-1.09/blib/lib/"- my current build
directory of CPAN as I later found out its real function)
when I should have put my local Perl's module installation dirctory
in @INC. No wonder the necessary CImpl.so file was missing and
couldn't be found.
Sorry about this and thanks for answering the question.
|
|
|
|
|