Can"t locate loadable object
Can"t locate loadable object
am 04.08.2005 07:18:16 von Dale
When using the DBI module on a Solaris system, I get the "Can't local
loadable object for module DBI" for a regular user, but not for the root
user. At first I thought the installation of the DBI module was at fault,
but it works flawlessly when root uses it (perl -e 'user DBI;').
Any suggestions?
Thanks
Re: Can"t locate loadable object
am 04.08.2005 09:23:13 von Sisyphus
"Dale" wrote in message
news:yuhIe.2720$HM1.2232@okepread03...
> When using the DBI module on a Solaris system, I get the "Can't local
> loadable object for module DBI" for a regular user, but not for the root
> user. At first I thought the installation of the DBI module was at fault,
> but it works flawlessly when root uses it (perl -e 'user DBI;').
>
> Any suggestions?
>
Are both root and user are using the same perl installation ? You could
check by having them both run:
perl -e 'print $^X'
It sounds like permissions. The "loadable object" referred to is DBI.so,
which will be in a different folder to DBI.pm. Perhaps there's some problem
with the permissions associated with DBI.so, or with the permissions
associated with the folder that houses DBI.so.
Can you find DBI.so ? It should be in a folder named 'auto' within one of
the @INC directories:
perl -e 'print $_, "\n" for @INC'
Cheers,
Rob
Re: Can"t locate loadable object
am 04.08.2005 19:59:37 von Dale
"Sisyphus" wrote in message
news:42f1c298$0$21677$afc38c87@news.optusnet.com.au...
>
> "Dale" wrote in message
> news:yuhIe.2720$HM1.2232@okepread03...
>> When using the DBI module on a Solaris system, I get the "Can't local
>> loadable object for module DBI" for a regular user, but not for the root
>> user. At first I thought the installation of the DBI module was at
>> fault,
>> but it works flawlessly when root uses it (perl -e 'user DBI;').
>>
>> Any suggestions?
>>
>
> Are both root and user are using the same perl installation ? You could
> check by having them both run:
>
> perl -e 'print $^X'
>
> It sounds like permissions. The "loadable object" referred to is DBI.so,
> which will be in a different folder to DBI.pm. Perhaps there's some
> problem
> with the permissions associated with DBI.so, or with the permissions
> associated with the folder that houses DBI.so.
>
> Can you find DBI.so ? It should be in a folder named 'auto' within one of
> the @INC directories:
>
> perl -e 'print $_, "\n" for @INC'
>
> Cheers,
> Rob
>
>
Thanks. Let's see if I can answer your questions one at a time.
The problem comes from users running the same perl script, which starts off
with #!/usr/local/bin/perl. I presume this means that everyone is using the
same Perl installation. There are two installations of Perl, one that came
with the O/S (Solaris 8) and one I installed later fro the compiled binary
that I downloaded from Sun. That gave me Perl 5.8.5, which met the
requirement for Perl DBI.
I did find the DBI.so file and noticed its permissions and ownership
precluded anyone but root and members of the 'other' group from accessing
the file (the specifics were "-rwxr-x--- root other DBI.so") and so I added
world readable to the permissions, hoping this would be enough, but it
wasn't.
I'd like to set world execute perms on the same file but I'm not at work
today so I'll try again tomorrow.
Re: Can"t locate loadable object
am 05.08.2005 02:23:26 von Sisyphus
"Dale" wrote in message
>
> The problem comes from users running the same perl script, which starts
off
> with #!/usr/local/bin/perl. I presume this means that everyone is using
the
> same Perl installation.
That's not necessarily so - on Linux, at least. On my Linux box I have a
/usr/bin/perl (used by the system and root) and a /usr/local/bin/perl which
user uses. I always run my scripts as 'perl script.pl' - so there's no need
for a shebang line and my scripts generally don't have one.
I find that running as root, 'perl script.pl' always uses /usr/bin/perl,
even if 'script.pl' begins with #!/usr/local/bin/perl.
Conversely, running as user, 'perl script.pl' always uses
/usr/local/bin/perl, even if 'script.pl' begins with #!/usr/bin/perl.
I don't know how it is in your case - your presumption may well be correct
(if you run your scripts as simply 'script.pl', it probably is) - I just
thought I'd mention this in case your presumption is incorrect :-)
Could be worth finding out for sure with a script that simply prints out the
value of $^X.
Cheers,
Rob
Re: Can"t locate loadable object
am 05.08.2005 03:29:39 von Dale
"Sisyphus" wrote in message
news:42f2b1b3$0$22591$afc38c87@news.optusnet.com.au...
>
> "Dale" wrote in message
>
>>
>> The problem comes from users running the same perl script, which starts
> off
>> with #!/usr/local/bin/perl. I presume this means that everyone is using
> the
>> same Perl installation.
>
> That's not necessarily so - on Linux, at least. On my Linux box I have a
> /usr/bin/perl (used by the system and root) and a /usr/local/bin/perl
> which
> user uses. I always run my scripts as 'perl script.pl' - so there's no
> need
> for a shebang line and my scripts generally don't have one.
>
> I find that running as root, 'perl script.pl' always uses /usr/bin/perl,
> even if 'script.pl' begins with #!/usr/local/bin/perl.
>
> Conversely, running as user, 'perl script.pl' always uses
> /usr/local/bin/perl, even if 'script.pl' begins with #!/usr/bin/perl.
>
> I don't know how it is in your case - your presumption may well be correct
> (if you run your scripts as simply 'script.pl', it probably is) - I just
> thought I'd mention this in case your presumption is incorrect :-)
>
> Could be worth finding out for sure with a script that simply prints out
> the
> value of $^X.
>
> Cheers,
> Rob
>
>
Well now, that IS interesting. I will look at this first thing tomorrow and
let you know after work. Thanks, your insight has been helpful.
Dale
Re: Can"t locate loadable object
am 05.08.2005 04:10:28 von Sisyphus
"Dale" wrote in message
> >
> Well now, that IS interesting. I will look at this first thing tomorrow
and
> let you know after work.
I'll be away for about a week (starting in an hour or so) - so there won't
be any follow-ups from me until I get back.
(Goin' cruisin' through the desert on a train.)
Cheers,
Rob