Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Installing modules locally as a non root

Reply
Thread Tools

Installing modules locally as a non root

 
 
sravi
Guest
Posts: n/a
 
      05-23-2005
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?

 
Reply With Quote
 
 
 
 
Mark Clements
Guest
Posts: n/a
 
      05-23-2005
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


 
Reply With Quote
 
 
 
 
Gunnar Hjalmarsson
Guest
Posts: n/a
 
      05-23-2005
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
 
Reply With Quote
 
sravi
Guest
Posts: n/a
 
      05-23-2005
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

 
Reply With Quote
 
Mark Clements
Guest
Posts: n/a
 
      05-23-2005
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
 
Reply With Quote
 
sravi
Guest
Posts: n/a
 
      05-23-2005

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?

 
Reply With Quote
 
Mark Clements
Guest
Posts: n/a
 
      05-23-2005
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
 
Reply With Quote
 
Christopher Nehren
Guest
Posts: n/a
 
      05-23-2005
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.
 
Reply With Quote
 
Mark Clements
Guest
Posts: n/a
 
      05-23-2005
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
 
Reply With Quote
 
Joe Smith
Guest
Posts: n/a
 
      05-24-2005
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
non root users accessing application installed with root instance hector C Programming 5 12-05-2006 01:01 PM
Installing RubyGems as non-root user on MacOS X Jose Marques Ruby 3 04-21-2005 03:09 PM
Installing modules on Solaris in non-default location boekhold@gmail.com Perl Misc 1 11-24-2004 12:45 PM
Problems getting Tkinter to work while installing python as non-root jose flanigan Python 0 07-04-2003 03:25 PM



Advertisments