Professional Web Applications Themes

installing perl module without root permission - PERL Beginners

Hi friends, I am in this condition : (1) I have to install XML::Simple or XML::Twig or such XML module. (2) Here Sys. administrator, does not install/ or allow me to install (1). When I try to use within my user, it says 'no permission' for wrting. (3) my Unix System does not have internet connectivity, so cannot use the module directly from net. Is there anyway installing/using these XML modules without su permission?...

  1. #1

    Default installing perl module without root permission

    Hi friends,
    I am in this condition :
    (1) I have to install XML::Simple or XML::Twig or such XML module.
    (2) Here Sys. administrator, does not install/ or allow me to install (1). When I try to use within my user, it says 'no permission' for wrting.
    (3) my Unix System does not have internet connectivity, so cannot use the module directly from net.

    Is there anyway installing/using these XML modules without su permission?

    Jayakumar Guest

  2. #2

    Default Re: installing perl module without root permission

    > Hi friends, 
    XML module. 
    me to install (1). When I try to use within my user, it says 'no
    permission' for wrting. 
    so cannot use the module directly from net. 
    permission? 

    The normal installation procedure can be followed but you will need to
    specify a prefix to install into, such as,

    perl Makefile.pl PREFIX=/home/jay/perl5lib
    make
    make test
    make install

    Then in your scripts you would use,

    use lib '/home/jay/perl5lib';

    Alternatively,

    perldoc FindBin

    I assume you know how to download the source tar ball from CPAN over the
    web and get it onto the machine yourself. Note that XML::Simple has at
    least one dependency of a base XML module, the same procedure should
    work for most of today's modules. Additionally some XML modules
    (including potential dependencies of XML::Simple) rely on the expat c
    libraries. I leave that as an exercise for the reader, though if the
    reader gives it an honest go and gets stuck, give us a ring and we will
    get it sorted....

    http://danconia.org
    Wiggins Guest

  3. #3

    Default Re: installing perl module without root permission

    take a look at http://www.rcbowen.com/imho/perl/modules.html. Specifically
    he/she writes:

    If you do not have root permissions on the machine where you want to
    install the module, such as if you wish to install a module in your home
    directory, just change one of those commands. Instead of


    perl Makefile.PL

    type


    perl Makefile.PL PREFIX=/path/to/where/you/want/it

    That will put all the files in that directory. In order to use modules
    that are stored in that location, you will need to add the following like
    to your Perl programs:


    use lib /path/to/where/you/want/it

    ___

    if those lines dont answer the question check the rest of that doent,
    it is very good at explaining it.


    Jayakumar Rajagopal wrote:
     
    module. 
    install (1). When I try to use within my user, it says 'no permission' for
    wrting. 
    cannot use the module directly from net.
     
    permission?


    Perldiscuss Guest

  4. #4

    Default RE: installing perl module without root permission

    I am getting same error when using 'make install' :

    Warning: You do not have permissions to install into /usr/perl5/site_perl/5.005/sun4-solaris at /usr/perl5/5.00503/ExtUtils/Install.pm line 61.
    mkdir /usr/perl5/site_perl/5.005/XML: Permission denied at /usr/perl5/5.00503/ExtUtils/Install.pm line 114

    bottom posted full details:

    -----Original Message-----
    From: Wiggins d Anconia [mailto:org]
    Sent: Thursday, April 08, 2004 2:58 PM
    To: Jayakumar Rajagopal; Perl Beginners
    Subject: Re: installing perl module without root permission

     
    XML module. 
    me to install (1). When I try to use within my user, it says 'no
    permission' for wrting. 
    so cannot use the module directly from net. 
    permission? 

    The normal installation procedure can be followed but you will need to
    specify a prefix to install into, such as,

    perl Makefile.pl PREFIX=/home/jay/perl5lib
    make
    make test
    make install

    Then in your scripts you would use,

    use lib '/home/jay/perl5lib';

    Alternatively,

    perldoc FindBin

    I assume you know how to download the source tar ball from CPAN over the
    web and get it onto the machine yourself. Note that XML::Simple has at
    least one dependency of a base XML module, the same procedure should
    work for most of today's modules. Additionally some XML modules
    (including potential dependencies of XML::Simple) rely on the expat c
    libraries. I leave that as an exercise for the reader, though if the
    reader gives it an honest go and gets stuck, give us a ring and we will
    get it sorted....

    http://danconia.org

    $$$>perl Makefile.PL PREFIX=/export/home2/jayaraj/JXML
    Do you want to install 'xml_pp' (XML pretty printer)? [y] n
    Do you want to install 'xml_grep' (XML grep - grep XML files using XML::Twig's subset of XPath)? [y] n
    Do you want to install 'xml_spellcheck' (spellcheck XML files skipping tags)? [y] n
    Writing Makefile for XML::Twig
    $$$>make
    echo "building Twig.pm"
    building Twig.pm
    /usr/bin/perl speedup Twig.pm.slow > Twig.pm
    perl version is 5.00503 XML::Pr version is 2.31
    /usr/bin/perl check_optional_modules
    iconv: illegal option -- V
    Usage: iconv -f fromcode -t tocode [file...]
    Did not find iconv
    Skip blib/lib/XML/Twig/XPath.pm (unchanged)
    Skip blib/lib/XML/Twig.pm (unchanged)
    Manifying blib/man3/XML::Twig.3
    $$$>make test
    echo "building Twig.pm"
    building Twig.pm
    /usr/bin/perl speedup Twig.pm.slow > Twig.pm
    perl version is 5.00503 XML::Pr version is 2.31
    /usr/bin/perl check_optional_modules
    iconv: illegal option -- V
    Usage: iconv -f fromcode -t tocode [file...]
    Did not find iconv
    Skip blib/lib/XML/Twig/XPath.pm (unchanged)
    Skip blib/lib/XML/Twig.pm (unchanged)
    PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/perl5/5.00503/sun4-solaris -I/usr/perl5/5.00503 -e 'use Test::Harness qw(&runtests $verbose); $ver
    bose=0; runtests ARGV;' t/*.t
    t/is_field..........ok
    t/pod...............skipping, Test::Pod required
    ok
    t/test1.............ok
    t/test2.............ok
    t/test3.............ok
    t/test4.............ok
    t/test5.............ok
    t/test_additional...Illegal hex digit ignored at t/test_additional.t line 1122.
    Illegal hex digit ignored at t/test_additional.t line 1122.
    Tie::IxHash not available: skipping 7 tests
    need perl 5.8 or above to perform these tests (you have 5.00503): skipping 3 tests
    require XML::Handler::YAWriter: skipping 3 tests
    XML::SAX::Writer not available: skipping 5 tests
    ok
    t/test_attregexp_cond.ok
    t/test_cdata........ok
    t/test_class_methods.ok
    t/test_comment_handler.ok
    t/test_drop_comments.ok
    t/test_entities.....ok
    t/test_erase........ok
    t/test_errors.......ok
    t/test_expand_external_entities.ok
    t/test_ignore_elts..ok
    t/test_nav..........ok
    t/test_need_io_scalar.skipping, need IO::Scalar
    ok
    t/test_need_use_bytes.skipping, need to be able to use bytes
    ok
    t/test_pi_handler...ok
    t/test_pos..........ok
    t/test_simplify.....Name "XML::Simple::PREFERRED_PR" used only once: possible typo at t/test_simplify.t line 22.
    Name "XML::Simple::VERSION" used only once: possible typo at t/test_simplify.t line 16.
    skipping: XML::Simple is not installed
    ok
    t/test_spaces.......ok
    t/test_twig_roots...ok
    t/test_unique_xpath.ok
    t/test_variables....ok
    t/test_with_lwp.....skipping, LWP not available
    ok
    t/test_xpath_cond...ok
    t/xmlxpath_01basic..skipping: XML::XPath not available
    ok
    t/xmlxpath_02descendant.skipping: XML::XPath not available
    ok
    t/xmlxpath_03star...skipping: XML::XPath not available
    ok
    t/xmlxpath_04pos....skipping: XML::XPath not available
    ok
    t/xmlxpath_05attrib.skipping: XML::XPath not available
    ok
    t/xmlxpath_06attrib_val.skipping: XML::XPath not available
    ok
    t/xmlxpath_07count..skipping: XML::XPath not available
    ok
    t/xmlxpath_08name...skipping: XML::XPath not available
    ok
    t/xmlxpath_09a_string_length.skipping: XML::XPath not available
    ok
    t/xmlxpath_09string_length.skipping: XML::XPath not available
    ok
    t/xmlxpath_10pipe...skipping: XML::XPath not available
    ok
    t/xmlxpath_12axisdescendant.skipping: XML::XPath not available
    ok
    t/xmlxpath_13axisparent.skipping: XML::XPath not available
    ok
    t/xmlxpath_14axisancestor.skipping: XML::XPath not available
    ok
    t/xmlxpath_15axisfol_sib.skipping: XML::XPath not available
    ok
    t/xmlxpath_16axisprec_sib.skipping: XML::XPath not available
    ok
    t/xmlxpath_17axisfollowing.skipping: XML::XPath not available
    ok
    t/xmlxpath_18axispreceding.skipping: XML::XPath not available
    ok
    t/xmlxpath_19axisd_or_s.skipping: XML::XPath not available
    ok
    t/xmlxpath_20axisa_or_s.skipping: XML::XPath not available
    ok
    t/xmlxpath_21allnodes.skipping: XML::XPath not available
    ok
    t/xmlxpath_22name_select.skipping: XML::XPath not available
    ok
    t/xmlxpath_23func...skipping: XML::XPath not available
    ok
    t/xmlxpath_24namespaces.skipping: XML::XPath not available
    ok
    t/xmlxpath_25scope..skipping: XML::XPath not available
    ok
    t/xmlxpath_26predicate.skipping: XML::XPath not available
    ok
    t/xmlxpath_28ancestor2.skipping: XML::XPath not available
    ok
    t/xmlxpath_29desc_with_predicate.skipping: XML::XPath not available
    ok
    t/xmlxpath_30lang...skipping: XML::XPath not available
    ok
    t/xmlxpath_additional.skipping: XML::XPath not available
    ok
    t/xmlxpath_nav......skipping: XML::XPath not available
    ok
    t/xmlxpath_test1....skipping: XML::XPath not available
    ok
    t/xmlxpath_test_twig_roots.skipping: XML::XPath not available
    ok
    t/xmlxpath_test_with_handlers.skipping: XML::XPath not available
    ok
    t/xmlxpath_xpath_cond.skipping: XML::XPath not available
    ok
    t/zz_dump_config....

    Configuration:

    perl: 5.00503
    OS: solaris - sun4-solaris
    XML::Pr : 2.31
    expat : 1.95.5
    Scalar::Util : <not available>
    WeakRef : <not available>
    Encode : <not available>
    Text::Iconv : <not available>
    Unicode::Map8 : <not available>
    LWP : <not available>
    HTML::Entities : <not available>
    Tie::IxHash : <not available>
    XML::XPath : <not available>
    Test : 1.122
    Test::Pod : <not available>
    XML::Simple : <not available>
    XML::Handler::YAWriter : <not available>
    XML::SAX::Writer : <not available>
    IO::Scalar : <not available>


    Please add this information to bug reports (you can run t/zz_dump_config.t to get it)

    ok
    All tests successful.
    Files=66, Tests=1276, 13 wallclock secs (10.69 cusr + 1.54 csys = 12.23 CPU)
    $$$>make install
    echo "building Twig.pm"
    building Twig.pm
    /usr/bin/perl speedup Twig.pm.slow > Twig.pm
    perl version is 5.00503 XML::Pr version is 2.31
    /usr/bin/perl check_optional_modules
    iconv: illegal option -- V
    Usage: iconv -f fromcode -t tocode [file...]
    Did not find iconv
    Skip blib/lib/XML/Twig/XPath.pm (unchanged)
    Skip blib/lib/XML/Twig.pm (unchanged)
    Manifying blib/man3/XML::Twig.3
    Warning: You do not have permissions to install into /usr/perl5/site_perl/5.005/sun4-solaris at /usr/perl5/5.00503/ExtUtils/Install.pm line 61.
    mkdir /usr/perl5/site_perl/5.005/XML: Permission denied at /usr/perl5/5.00503/ExtUtils/Install.pm line 114
    *** Error code 2
    make: Fatal error: Command failed for target `pure_site_install'
    jayarajeaglesun85</export/home2/jayaraj/JXML/XML-Twig-3.14>
    Jayakumar Guest

  5. #5

    Default RE: installing perl module without root permission

    > I am getting same error when using 'make install' : 
    /usr/perl5/site_perl/5.005/sun4-solaris at
    /usr/perl5/5.00503/ExtUtils/Install.pm line 61. 
    /usr/perl5/5.00503/ExtUtils/Install.pm line 114 

    [snip]
     
    XML::Twig's subset of XPath)? [y] n 
    tags)? [y] n 

    Originally I was thinking it might be the age of your Perl that was
    causing the problem but the docs don't seem to suggest anything different:

    http://perldoc.com/perl5.005_03/lib/ExtUtils/MakeMaker.html#PREFIX-and-LIB-attribute

    You might try the 'LIB' switch instead of (or in addition to) the
    'PREFIX'.

    [snip]
     

    [snip]
     
    /usr/perl5/site_perl/5.005/sun4-solaris at
    /usr/perl5/5.00503/ExtUtils/Install.pm line 61. 
    /usr/perl5/5.00503/ExtUtils/Install.pm line 114 

    Don't know why the prefix wouldn't be honored. If the 'LIB' suggestion
    doesn't work can you post the "# --- MakeMaker constants section:"
    section of the 'Makefile'.... If all else fails you should be able to
    hack the install directories you need directly into the Makefile.

    http://danconia.org
    Wiggins Guest

  6. #6

    Default Re: installing perl module without root permission

    >>>>> "Jayakumar" == Jayakumar Rajagopal <com> writes:

    Jayakumar> Hi friends,
    Jayakumar> I am in this condition :
    Jayakumar> (1) I have to install XML::Simple or XML::Twig or such XML module.
    Jayakumar> (2) Here Sys. administrator, does not install/ or allow me to install (1). When I try to use within my user, it says 'no permission' for wrting.
    Jayakumar> (3) my Unix System does not have internet connectivity, so cannot use the module directly from net.

    Jayakumar> Is there anyway installing/using these XML modules without su permission?

    Yes, and the instructions are included with your copy of Perl,
    in "perldoc perlmodinstall".

    --
    Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
    <com> <URL:http://www.stonehenge.com/merlyn/>
    Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
    See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
    Randal Guest

  7. #7

    Default Re: installing perl module without root permission


    On Apr 9, 2004, at 6:27 AM, Randal L. Schwartz wrote:
     

    What if perldoc is not included for some reason?

    Gohaku Guest

  8. #8

    Default Re: installing perl module without root permission

    >>>>> "gohaku" == gohaku <net> writes:

    gohaku> What if perldoc is not included for some reason?

    All perl distros (except macperl for os 9) in the past eight years
    or so have "perldoc".

    --
    Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
    <com> <URL:http://www.stonehenge.com/merlyn/>
    Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
    See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
    Randal Guest

  9. #9

    Default Re: installing perl module without root permission

    Please bottom post, and please read the previous threads. Your
    information is correct, but has already been provided. I didn't see much
    in that doent that hasn't already been covered. Does anyone have
    anything else pertinent (aka hasn't already been mentioned) to add?

    http://danconia.org
     
    > module. [/ref]
    allow me to 
    > cannot use the module directly from net.

    > permission?
    >[/ref]

    Wiggins Guest

  10. #10

    Default RE: installing perl module without root permission


    -----Original Message-----
    From: Wiggins d Anconia [mailto:org]
    Sent: Friday, April 09, 2004 10:11 AM
    To: org
    Subject: Re: installing perl module without root permission


    Please bottom post, and please read the previous threads. Your
    information is correct, but has already been provided. I didn't see much
    in that doent that hasn't already been covered. Does anyone have
    anything else pertinent (aka hasn't already been mentioned) to add?

    http://danconia.org
     
    > module. [/ref]
    allow me to 
    > cannot use the module directly from net.
    >  
    > permission?
    > [/ref]
    ###############################

    Wiggins/Gohaku/Randal/Jason/All,

    Thank you all for helps with great spirits. I tried hacking in Makefile etc, resetting different paths. They did not work too. But setting both PREFIX and LIB variables did the trick. It is working fine now.

    Gohaku : how you knew I did not have perldoc in my machine? :)

    Below some bug reporting message given 'make install' (see last line) anyway :
    regards,
    Jay

    t/test_attregexp_cond.ok
    t/test_cdata........ok
    t/test_class_methods.ok
    t/test_comment_handler.ok
    t/test_drop_comments.ok
    t/test_entities.....ok
    t/test_erase........ok
    t/test_errors.......ok
    t/test_expand_external_entities.ok
    t/test_ignore_elts..ok
    t/test_nav..........ok
    t/test_need_io_scalar.skipping, need IO::Scalar
    ok
    t/test_need_use_bytes.skipping, need to be able to use bytes
    ok
    t/test_pi_handler...ok
    t/test_pos..........ok
    t/test_simplify.....Name "XML::Simple::PREFERRED_PR" used only once: possible typo at t/test_simplify.t line 22.
    Name "XML::Simple::VERSION" used only once: possible typo at t/test_simplify.t line 16.
    skipping: XML::Simple is not installed
    ok
    t/test_spaces.......ok
    t/test_twig_roots...ok
    t/test_unique_xpath.ok
    t/test_variables....ok
    t/test_with_lwp.....skipping, LWP not available
    ok
    t/test_xpath_cond...ok
    t/xmlxpath_01basic..skipping: XML::XPath not available
    ok
    t/xmlxpath_02descendant.skipping: XML::XPath not available
    ok
    t/xmlxpath_03star...skipping: XML::XPath not available
    ok
    t/xmlxpath_04pos....skipping: XML::XPath not available
    ok
    t/xmlxpath_05attrib.skipping: XML::XPath not available
    ok
    t/xmlxpath_06attrib_val.skipping: XML::XPath not available
    ok
    t/xmlxpath_07count..skipping: XML::XPath not available
    ok
    t/xmlxpath_08name...skipping: XML::XPath not available
    ok
    t/xmlxpath_09a_string_length.skipping: XML::XPath not available
    ok
    t/xmlxpath_09string_length.skipping: XML::XPath not available
    ok
    t/xmlxpath_10pipe...skipping: XML::XPath not available
    ok
    t/xmlxpath_12axisdescendant.skipping: XML::XPath not available
    ok
    t/xmlxpath_13axisparent.skipping: XML::XPath not available
    ok
    t/xmlxpath_14axisancestor.skipping: XML::XPath not available
    ok
    t/xmlxpath_15axisfol_sib.skipping: XML::XPath not available
    ok
    t/xmlxpath_16axisprec_sib.skipping: XML::XPath not available
    ok
    t/xmlxpath_17axisfollowing.skipping: XML::XPath not available
    ok
    t/xmlxpath_18axispreceding.skipping: XML::XPath not available
    ok
    t/xmlxpath_19axisd_or_s.skipping: XML::XPath not available
    ok
    t/xmlxpath_20axisa_or_s.skipping: XML::XPath not available
    ok
    t/xmlxpath_21allnodes.skipping: XML::XPath not available
    ok
    t/xmlxpath_22name_select.skipping: XML::XPath not available
    ok
    t/xmlxpath_23func...skipping: XML::XPath not available
    ok
    t/xmlxpath_24namespaces.skipping: XML::XPath not available
    ok
    t/xmlxpath_25scope..skipping: XML::XPath not available
    ok
    t/xmlxpath_26predicate.skipping: XML::XPath not available
    ok
    t/xmlxpath_28ancestor2.skipping: XML::XPath not available
    ok
    t/xmlxpath_29desc_with_predicate.skipping: XML::XPath not available
    ok
    t/xmlxpath_30lang...skipping: XML::XPath not available
    ok
    t/xmlxpath_additional.skipping: XML::XPath not available
    ok
    t/xmlxpath_nav......skipping: XML::XPath not available
    ok
    t/xmlxpath_test1....skipping: XML::XPath not available
    ok
    t/xmlxpath_test_twig_roots.skipping: XML::XPath not available
    ok
    t/xmlxpath_test_with_handlers.skipping: XML::XPath not available
    ok
    t/xmlxpath_xpath_cond.skipping: XML::XPath not available
    ok
    t/zz_dump_config....

    Configuration:

    perl: 5.00503
    OS: solaris - sun4-solaris
    XML::Pr : 2.31
    expat : 1.95.5
    Scalar::Util : <not available>
    WeakRef : <not available>
    Encode : <not available>
    Text::Iconv : <not available>
    Unicode::Map8 : <not available>
    LWP : <not available>
    HTML::Entities : <not available>
    Tie::IxHash : <not available>
    XML::XPath : <not available>
    Test : 1.122
    Test::Pod : <not available>
    XML::Simple : <not available>
    XML::Handler::YAWriter : <not available>
    XML::SAX::Writer : <not available>
    IO::Scalar : <not available>


    Please add this information to bug reports (you can run t/zz_dump_config.t to get it)
    Jayakumar Guest

  11. #11

    Default RE: installing perl module without root permission

    gohaku wrote: 
    >
    > What if perldoc is not included for some reason?[/ref]

    perldoc may be installed, but not in your PATH. Perl comes with a number of
    programs, including perldoc, a2p, s2p, perlbug, etc. in addition to the perl
    interpreter itself.

    The installation process will place those programs in the "scriptdir", which
    defaults to ${PREFIX}/bin. So if your prefix is /usr/local, perldoc will go
    to /usr/local/bin/perldoc. But if your prefix is /usr/local/perl, then
    perldoc will be /usr/local/perl/bin/perldoc.

    (Modules you install from CPAN will sometimes place programs in this
    directory. For instance, the LWP module puts GET, HEAD, and POST scripts
    there.)

    The installation process then links the perl interpreter to the "canonical
    location", /usr/bin/perl.

    /usr/bin is almost always in your PATH, so you can typically find perl
    itself. However, the scriptdir may not be in the PATH, meaning perldoc would
    not be found.

    You can find the location where perldoc "should" be by entering the command:

    $ perl -V:scriptdir
    scriptdir='/usr/local/bin';

    If perldoc is in that directory, you can either specifiy the full path to
    perldoc, add the directory to your PATH, or create a link somewhere.

    If perldoc is not in that directory, your perl installation should be
    considered broken, and the problem should be corrected before you do
    anything further.
    Bob Guest

  12. #12

    Default RE: installing perl module without root permission

    >gohaku> What if perldoc is not included for some reason? 

    oddly enough- my Knoppix install does not... i'll have
    to remedy that someday...

    willy
    William Guest

Similar Threads

  1. Installing DBD:Oracle module on Perl 5.8.4
    By szikria in forum PERL Modules
    Replies: 2
    Last Post: October 6th, 09:35 AM
  2. Installing DBI module for Perl 5.8.4
    By szikria in forum PERL Modules
    Replies: 2
    Last Post: October 5th, 06:01 PM
  3. Installing Perl InlineC module in Windows 2003
    By Sankaran in forum PERL Modules
    Replies: 1
    Last Post: August 14th, 09:06 AM
  4. Problem installing a perl module "File exists"
    By TheDD in forum PERL Modules
    Replies: 1
    Last Post: June 1st, 05:08 PM
  5. Problem installing Perl-RPM module on a RedHat 9.0
    By Steve Houle in forum PERL Modules
    Replies: 1
    Last Post: September 24th, 06:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139