Page 1 of 2 12 Last
  • Jump to page:
    #1
  1. No Profile Picture
    Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2003
    Posts
    3,601
    Rep Power
    595

    Local::lib troubles


    I'm developing a script on a host on which I do not have root privileges. I need a CPAN module that is not installed in the system library. I thought the solution was to simply use local::lib but that is turning out to not be simple. Perhaps my definition of bootstrap is different than that of others but I expected it to mean no outside libraries or dependencies are needed. In any case when I do the 'perl Makefile.PL --bootstrap' I get all kinds of prereq and dependency errors. There are missing CPAN modules, various wrong versions, etc. I have no idea how to get this installed. Can someone explain what dependencies are required and how I get them without root privileges? TIA.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  2. #2
  3. 'fie' on me, allege-dly
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2003
    Location
    in da kitchen ...
    Posts
    12,894
    Rep Power
    6444
    just
    perl Code:
    use lib 'path/to/module';
    ?
    --Ax
    without exception, there is no rule ...
    Handmade Irish Jewellery
    Targeted Advertising Cookie Optout (TACO) extension for Firefox
    The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones


    09 F9 11 02
    9D 74 E3 5B
    D8 41 56 C5
    63 56 88 C0
    Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.
    -- Jamie Zawinski
    Detavil - the devil is in the detail, allegedly, and I use the term advisedly, allegedly ... oh, no, wait I did ...
    BIT COINS ANYONE
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2003
    Posts
    3,601
    Rep Power
    595
    Thanks but I don't know how to install a CPAN module that way.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Apr 2009
    Posts
    1,954
    Rep Power
    1225
    What module(s) are you trying to install?

    Why are you using --bootstrap when you should be using PREFIX?

    perlmonks: A Guide to Installing Modules

    google search: how to install perl modules in local directory
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2003
    Posts
    3,601
    Rep Power
    595
    I'm trying to install RCP::XML and its prereqs. I am using --bootstrap because that is what all the searches I came up with (including some of yours) said to do. I'll try the prefix approach.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Apr 2009
    Posts
    1,954
    Rep Power
    1225
    PREFIX is used to specify where the module is to be installed. I've never used or suggested using bootstrap and it's not covered in the perlmonks page I linked to, but it may be in one of pages from those google search links.

    It would probably be best to add the PREFIX to the cpan config so that it can easily install the dependencies.
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2003
    Posts
    3,601
    Rep Power
    595
    Using prefix was not much help, I don't think. I am getting the same errors and warnings as before. However, on a lark I decided to try installing RPC::XML anyway, expecting it to blow up immediately. It actually started running so maybe all those errors can be ignored (pretty bad if that is the case). Perhaps I am using the wrong command but from the google searches this is what I thought I was supposed to do:

    perl -Mlib -MCPAN -e shell

    This is obviously wrong for a couple of reasons. The main one being it still tried to install the modules in the system library. I am guessing that it is more likely that those errors cannot be ignored and there is something wrong with the make.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Apr 2009
    Posts
    1,954
    Rep Power
    1225
    -Mlib is not what you want.

    First, get into the cpan shell.
    perl -MCPAN -e shell

    Then output and inspect the current config.
    cpan[1]> o conf

    The config param that you want to set/adjust is makepl_arg
    e.g.
    cpan[2]>o conf makepl_arg PREFIX=/home/myaccount/test/lib

    At that point all modules installed via cpan will be installed under that path instead of the system path.
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2003
    Posts
    3,601
    Rep Power
    595
    Thanks but no joy, although it did try to install in the correct local directory. Lots of "dubious" test results errors. Here are the last lines of the install, FWIW:

    Failed during this command:
    PMQS/Compress-Raw-Zlib-2.060.tar.gz : make_test NO
    PMQS/Compress-Raw-Bzip2-2.060.tar.gz : make_test NO
    PMQS/IO-Compress-2.060.tar.gz : make_test NO
    GAAS/HTTP-Message-6.06.tar.gz : make_test NO
    GAAS/libwww-perl-6.04.tar.gz : make_test NO
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2003
    Posts
    3,601
    Rep Power
    595
    For anyone else that runs into this, apparently local::lib and RPC::XML have very poorly written installers. In spite of the many errors and failed tests, it still seems to work (no extensive testing but simple basics) although I don't yet know how well.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  20. #11
  21. No Profile Picture
    Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2003
    Posts
    3,601
    Rep Power
    595
    Back to square one. I am having lots of problems using this module. Apparently all those errors cannot be ignored. So back to my original question, how do I do a clean install of local::lib when there are lots of errors that seem to need root privileges to fix?
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  22. #12
  23. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Apr 2009
    Posts
    1,954
    Rep Power
    1225
    I question your need to install local::lib when there are other ways to accomplish the same thing.

    What platform are you on, Windows, Mac, Linux? And what version of perl is installed?

    What is the very first error (or sign of failure) you receive?

    It's often true that a single error could be the cause of other errors downstream. Start with troubleshooting/fixing the first error and see if that clears up some/most of the other errors.
    Last edited by FishMonger; February 21st, 2013 at 10:40 AM.
  24. #13
  25. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Apr 2009
    Posts
    1,954
    Rep Power
    1225
    What value did you set for the prerequisites_policy config setting in cpan? I believe the default is ask but it's best if you set it to follow.
  26. #14
  27. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Apr 2009
    Posts
    1,954
    Rep Power
    1225
    Another approach you may want to consider is to install perlbrew which gives you the ability to have your own perl installation in your home directory independent of the system perl.

    What is perlbrew
  28. #15
  29. No Profile Picture
    Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2003
    Posts
    3,601
    Rep Power
    595
    I'm not sure what other alternatives you are referring to but I'll try perlbrew. Thanks.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
Page 1 of 2 12 Last
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo