Installing modules locally as a non root

Discussion in 'Perl Misc' started by sravi, May 23, 2005.

  1. sravi

    sravi Guest

    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?
     
    sravi, May 23, 2005
    #1
    1. Advertising

  2. 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
     
    Mark Clements, May 23, 2005
    #2
    1. Advertising

  3. 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
     
    Gunnar Hjalmarsson, May 23, 2005
    #3
  4. sravi

    sravi Guest

    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
     
    sravi, May 23, 2005
    #4
  5. 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
     
    Mark Clements, May 23, 2005
    #5
  6. sravi

    sravi Guest

    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?
     
    sravi, May 23, 2005
    #6
  7. 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
     
    Mark Clements, May 23, 2005
    #7
  8. 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.
     
    Christopher Nehren, May 23, 2005
    #8
  9. 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
     
    Mark Clements, May 23, 2005
    #9
  10. sravi

    Joe Smith Guest

    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
     
    Joe Smith, May 24, 2005
    #10
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jose flanigan
    Replies:
    0
    Views:
    343
    jose flanigan
    Jul 4, 2003
  2. hector
    Replies:
    5
    Views:
    428
    CBFalconer
    Dec 5, 2006
  3. Jose Marques
    Replies:
    3
    Views:
    388
    Jose Marques
    Apr 21, 2005
  4. g_u_s
    Replies:
    5
    Views:
    106
    g_u_s
    Jun 2, 2005
  5. Phrogz
    Replies:
    6
    Views:
    145
    Ezra Zygmuntowicz
    Oct 12, 2005
Loading...

Share This Page