The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> Perl Programming
|
Local::lib troubles
Discuss Local::lib troubles in the Perl Programming forum on Dev Shed. Local::lib troubles Perl Programming forum discussing coding in Perl, utilizing Perl modules, and other Perl-related topics. Perl, the Practical Extraction and Reporting Language, is the choice for many for parsing textual information.
|
|
 |
|
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

February 20th, 2013, 08:49 AM
|
|
|
|
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.
|

February 20th, 2013, 11:22 AM
|
 |
'fie' on me, allege-dly
|
|
Join Date: Mar 2003
Location: in da kitchen ...
|
|
just
perl Code:
Original
- 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
Deta vil - the devil is in the detail, allegedly, and I use the term advisedly, allegedly ... oh, no, wait I did ...
BIT COINS ANYONE
|

February 20th, 2013, 11:47 AM
|
|
|
|
Thanks but I don't know how to install a CPAN module that way.
|

February 20th, 2013, 12:11 PM
|
|
|
|

February 20th, 2013, 12:24 PM
|
|
|
|
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.
|

February 20th, 2013, 12:34 PM
|
|
|
|
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.
|

February 20th, 2013, 01:23 PM
|
|
|
|
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.
|

February 20th, 2013, 01:55 PM
|
|
|
|
-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.
|

February 20th, 2013, 02:14 PM
|
|
|
|
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
|

February 21st, 2013, 07:45 AM
|
|
|
|
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.
|

February 21st, 2013, 09:26 AM
|
|
|
|
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?
|

February 21st, 2013, 09:37 AM
|
|
|
|
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 09:40 AM.
|

February 21st, 2013, 09:46 AM
|
|
|
|
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.
|

February 21st, 2013, 09:55 AM
|
|
|
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
|

February 21st, 2013, 10:09 AM
|
|
|
|
I'm not sure what other alternatives you are referring to but I'll try perlbrew. Thanks.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|