Installing modules locally as a non root

S

sravi

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?
 
M

Mark Clements

sravi said:
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
 
S

sravi

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
 
M

Mark Clements

sravi said:
Here is the output of "find /home/sravi/perl -print"
You need to give some context to your posts. Please read the posting
guidelines.

/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
 
S

sravi

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



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?
 
M

Mark Clements

sravi said:
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
 
C

Christopher Nehren

On 2005-05-23, Mark Clements scribbled these
curious markings:
[No module-related content, so groups and followups trimmed]
<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
 
M

Mark Clements

Christopher said:
On 2005-05-23, Mark Clements scribbled these
curious markings:
[No module-related content, so groups and followups trimmed]
<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
 
J

Joe Smith

Christopher said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,733
Latest member
LonaMonzon

Latest Threads

Top