Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl Misc (http://www.velocityreviews.com/forums/f67-perl-misc.html)
-   -   Installing modules locally as a non root (http://www.velocityreviews.com/forums/t892493-installing-modules-locally-as-a-non-root.html)

sravi 05-23-2005 11:21 AM

Installing modules locally as a non root
 
I need the perl module Digest::Nilsimsa. Since I don't have root
permissions, I have to install this locally. I used the following
commands

perl Makefile.PL PREFIX=/home/sravi/perl
make
make test
make install

All the commands where executed successfully, but the following program
is giving the error
"Can't locate Digest/Nilsimsa.pm in @INC (@INC contains:
/home/sravi/perl /home/sravi/perl
/usr/local/lib/perl5/sun4-solaris/5.00404 /usr/local/lib/perl5
/usr/local/lib/perl5/site_perl/sun4-solaris
/usr/local/lib/perl5/site_perl /usr/local/lib/perl5/sun4-solaris .) at
../tmp.pl line 5.
BEGIN failed--compilation aborted at ./tmp.pl line 5."

#!/usr/local/bin/perl -w

use lib "/home/sravi/perl";

use Digest::Nilsimsa;

my $nils = Digest::Nilsimsa;

my $digest = $nils->text2digest("hi");

print $digest, "\n";


Does anyone know what is the problem with this?


Mark Clements 05-23-2005 11:39 AM

Re: Installing modules locally as a non root
 
sravi wrote:

> I need the perl module Digest::Nilsimsa. Since I don't have root
> permissions, I have to install this locally. I used the following
> commands
>
> perl Makefile.PL PREFIX=/home/sravi/perl
> make
> make test
> make install
>
> All the commands where executed successfully, but the following
> program is giving the error
> "Can't locate Digest/Nilsimsa.pm in @INC (@INC contains:
> /home/sravi/perl /home/sravi/perl
> /usr/local/lib/perl5/sun4-solaris/5.00404 /usr/local/lib/perl5
> /usr/local/lib/perl5/site_perl/sun4-solaris
> /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/sun4-solaris .) at
> ./tmp.pl line 5.
> BEGIN failed--compilation aborted at ./tmp.pl line 5."
>
> #!/usr/local/bin/perl -w
>
> use lib "/home/sravi/perl";
>
> use Digest::Nilsimsa;
>

<snip>
That is a seriously ancient version of Perl you have there. You may
like to ask your admin to do something about it.

Assuming you have read

http://www.cpan.org/misc/cpan-faq.html#How_use_private

or similar, you can try a few things.

does

find /home/sravi/perl -print

give you the result you expect?

What happens if you set the use lib line to eg

use lib qw(/home/sravi/perl/perl5/site_perl/5.00404);

or wherever it is the module has actually been installed? You may have
to toy with this.

Mark



Gunnar Hjalmarsson 05-23-2005 11:39 AM

Re: Installing modules locally as a non root
 
sravi wrote:
>
> perl Makefile.PL PREFIX=/home/sravi/perl


<snip>

> use lib "/home/sravi/perl";
> use Digest::Nilsimsa;


Check in which directory the "Digest" directory is located, and adapt
the "use lib" statement accordingly.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

sravi 05-23-2005 12:07 PM

Re: Installing modules locally as a non root
 
Here is the output of "find /home/sravi/perl -print"
/home/sravi/perl
/home/sravi/perl/lib
/home/sravi/perl/lib/site_perl
/home/sravi/perl/lib/site_perl/sun4-solaris
/home/sravi/perl/lib/site_perl/sun4-solaris/auto
/home/sravi/perl/lib/site_perl/sun4-solaris/auto/Digest
/home/sravi/perl/lib/site_perl/sun4-solaris/auto/Digest/Nilsimsa
/home/sravi/perl/lib/site_perl/sun4-solaris/auto/Digest/Nilsimsa/Nilsimsa.so
/home/sravi/perl/lib/site_perl/sun4-solaris/auto/Digest/Nilsimsa/Nilsimsa.bs
/home/sravi/perl/lib/site_perl/sun4-solaris/auto/Digest/Nilsimsa/.packlist
/home/sravi/perl/lib/site_perl/Digest
/home/sravi/perl/lib/site_perl/Digest/Nilsimsa.pm
/home/sravi/perl/lib/sun4-solaris
/home/sravi/perl/lib/sun4-solaris/5.00404
/home/sravi/perl/lib/sun4-solaris/5.00404/perllocal.pod
/home/sravi/perl/man
/home/sravi/perl/man/man3
/home/sravi/perl/man/man3/Digest::Nilsimsa.3


Mark Clements 05-23-2005 12:13 PM

Re: Installing modules locally as a non root
 
sravi wrote:

> Here is the output of "find /home/sravi/perl -print"

You need to give some context to your posts. Please read the posting
guidelines.

<snip>

> /home/sravi/perl/lib/site_perl/Digest/Nilsimsa.pm


try setting

use lib qw(/home/sravi/perl/lib);

and failing that

use lib qw(/home/sravi/perl/lib/site_perl);

Mark

sravi 05-23-2005 12:18 PM

Re: Installing modules locally as a non root
 

Mark Clements wrote:
> sravi wrote:
>
> > Here is the output of "find /home/sravi/perl -print"

> You need to give some context to your posts. Please read the posting
> guidelines.
>
> <snip>
>
> > /home/sravi/perl/lib/site_perl/Digest/Nilsimsa.pm

>
> try setting
>
> use lib qw(/home/sravi/perl/lib);


This gave the following error

Can't locate Digest/Nilsimsa.pm in @INC (@INC contains:
/home/sravi/perl/lib /usr/local/perl-5.8.3/lib/5.8.3/sun4-solaris
/usr/local/perl-5.8.3/lib/5.8.3
/usr/local/perl-5.8.3/lib/site_perl/5.8.3/sun4-solaris
/usr/local/perl-5.8.3/lib/site_perl/5.8.3
/usr/local/perl-5.8.3/lib/site_perl .) at /home/sravi/tmp.pl line 9.


>
> and failing that
>
> use lib qw(/home/sravi/perl/lib/site_perl);
>


This gave the following error,

Can't load
'/home/sravi/perl/lib/site_perl/sun4-solaris/auto/Digest/Nilsimsa/Nilsimsa.so'
for module Digest::Nilsimsa: ld.so.1: /usr/local/bin/perl5.8.3: fatal:
relocation error: file
/home/sravi/perl/lib/site_perl/sun4-solaris/auto/Digest/Nilsimsa/Nilsimsa.so:
symbol Perl_markstack_ptr: referenced symbol not found at
/usr/local/perl-5.8.3/lib/5.8.3/sun4-solaris/DynaLoader.pm line 229.
at /home/sravi/tmp.pl line 9
Compilation failed in require at /home/sravi/tmp.pl line 9.
BEGIN failed--compilation aborted at /home/sravi/tmp.pl line 9.


Should I move some files to other directory to work?


Mark Clements 05-23-2005 12:27 PM

Re: Installing modules locally as a non root
 
sravi wrote:

>
> Mark Clements wrote:
> > sravi wrote:
> >
> > > Here is the output of "find /home/sravi/perl -print"

> > You need to give some context to your posts. Please read the posting
> > guidelines.
> >
> > <snip>
> >
> > > /home/sravi/perl/lib/site_perl/Digest/Nilsimsa.pm

> >
> > try setting


<snip>
> > use lib qw(/home/sravi/perl/lib/site_perl);
> >

>
> This gave the following error,
>
> Can't load
> '/home/sravi/perl/lib/site_perl/sun4-solaris/auto/Digest/Nilsimsa/Nils
> imsa.so' for module Digest::Nilsimsa: ld.so.1:
> /usr/local/bin/perl5.8.3: fatal: relocation error: file
> /home/sravi/perl/lib/site_perl/sun4-solaris/auto/Digest/Nilsimsa/Nilsi
> msa.so: symbol Perl_markstack_ptr: referenced symbol not found at
> /usr/local/perl-5.8.3/lib/5.8.3/sun4-solaris/DynaLoader.pm line 229.
> at /home/sravi/tmp.pl line 9
> Compilation failed in require at /home/sravi/tmp.pl line 9.
> BEGIN failed--compilation aborted at /home/sravi/tmp.pl line 9.
>
>
> Should I move some files to other directory to work?


I've googled the error for you (you could have done this yourself) and
I'd guess that you are mixing and matching perl versions. The previous
one mentioned by you was very old, but the error above indicates 5.8.3.
You have probably run CPAN using the ancient version, and now you are
trying to run it using the newer version. I suggest you ask your
sysadmin for help.

Mark

Christopher Nehren 05-23-2005 04:54 PM

Re: Installing modules locally as a non root
 
On 2005-05-23, Mark Clements scribbled these
curious markings:
[No module-related content, so groups and followups trimmed]
> sravi wrote:
>
>> "Can't locate Digest/Nilsimsa.pm in @INC (@INC contains:
>> /home/sravi/perl /home/sravi/perl
>> /usr/local/lib/perl5/sun4-solaris/5.00404 /usr/local/lib/perl5
>> /usr/local/lib/perl5/site_perl/sun4-solaris
>> /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/sun4-solaris .) at
>> ./tmp.pl line 5.
>> BEGIN failed--compilation aborted at ./tmp.pl line 5."

> <snip>
> That is a seriously ancient version of Perl you have there. You may
> like to ask your admin to do something about it.


And that is the seriously ancient version of Perl which is shipped with
Solaris which *must* remain installed to remain compatible with legacy
scripts which are required for the proper running of a Solaris system.
There was a rather large thread here a while ago which discussed this.

Best Regards,
Christopher Nehren
--
I abhor a system designed for the "user", if that word is a coded
pejorative meaning "stupid and unsophisticated". -- Ken Thompson
If you ask the wrong people questions, you get "Joel on Software".
Unix is user friendly. However, it isn't idiot friendly.

Mark Clements 05-23-2005 08:17 PM

Re: Installing modules locally as a non root
 
Christopher Nehren wrote:

> On 2005-05-23, Mark Clements scribbled these
> curious markings:
> [No module-related content, so groups and followups trimmed]
> > sravi wrote:
> >
> >> "Can't locate Digest/Nilsimsa.pm in @INC (@INC contains:
> >> /home/sravi/perl /home/sravi/perl
> >> /usr/local/lib/perl5/sun4-solaris/5.00404 /usr/local/lib/perl5
> >> /usr/local/lib/perl5/site_perl/sun4-solaris
> >> /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/sun4-solaris

> .) at >> ./tmp.pl line 5.
> >> BEGIN failed--compilation aborted at ./tmp.pl line 5."

> > <snip>
> > That is a seriously ancient version of Perl you have there. You may
> > like to ask your admin to do something about it.

>
> And that is the seriously ancient version of Perl which is shipped
> with Solaris which must remain installed to remain compatible with
> legacy scripts which are required for the proper running of a Solaris
> system. There was a rather large thread here a while ago which
> discussed this.
>

I'm clearly missing something here: if it ships with Solaris, then why
is it looking in /usr/local/lib/perl5 rather than /usr/perl5/lib? As
far as I can tell, Solaris 8 was the first Solaris to ship with perl,
and that was 5.00503.

Anyway, one wouldn't necessarily have to remove an existing perl in
order to install a new one, and new development should probably be
undertaken using a modern perl.


Mark

Joe Smith 05-24-2005 10:10 AM

Re: Installing modules locally as a non root
 
Christopher Nehren wrote:
>> /usr/local/lib/perl5/sun4-solaris/5.00404

>
> And that is the seriously ancient version of Perl which is shipped with
> Solaris which *must* remain installed to remain compatible with legacy
> scripts which are required for the proper running of a Solaris system.


You are very much mistaken.

The version of perl that *must* remain installed is the one in
/usr/perl5, not the one in /usr/local. End users are allowed (and
expected) to put newer versions in /usr/local, as long as they
don't touch the Solaris-provide /usr/perl5 files.
-Joe


All times are GMT. The time now is 06:53 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.