Perl Forum for Beginners

CPAN cannot install modules locally

Jul 23, 2011 2:07 am
Alok

--------------030906090903000905040702
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi

I am trying to install MediaWiki::Bot module locally on my server (I am
not the admin).
I am trying to use cpan command line interface for this.

I used following options before beginning installation:
o conf makepl_args "LIBS=-L/home/foo/local/lib
INC=-I/home/foo/local/include PREFIX=/home/foo/local/"
o conf commit

It turned out that MediaWiki::Bot requires bunch of other modules that
cpan tries to install. But I see that many of them fail test cases
because they cannot detect each other. For example,

# Failed test at t/warnings_exist.t line 36.
# got: 'Base class package "Tree::DAG_Node" is empty.'

Or they are getting incorrect version (possibly the one thats installed
in /usr/lib/perl)

#.HTML::Entities version 3.28 required--this is only version 1.35 at
/home/foo/.cpan/build/MediaWiki-Bot-3.4.0-X3wY3E/blib/lib/MediaWiki/Bot.pm
line 7.

And due to failed test cases cpan does not install anything.

How do I ensure that cpan uses the modules from /home/foo/local ?
Essentially, I want to override the library preference order. I thought
I was doing that using the o conf makepl_args option. But apparently it
is not working.

Any help will be greatly appreciated.

Thanks,
Alok

--------------030906090903000905040702--

Jul 23, 2011 1:36 pm
Shlomi Fish
Re: CPAN cannot install modules locally

Hi Alok,

On Fri, 22 Jul 2011 22:07:15 -0400
Alok <alokkw@gmail.com> wrote:

> Hi
>
> I am trying to install MediaWiki::Bot module locally on my server (I am
> not the admin).
> I am trying to use cpan command line interface for this.
>
> I used following options before beginning installation:
> o conf makepl_args "LIBS=-L/home/foo/local/lib
> INC=-I/home/foo/local/include PREFIX=/home/foo/local/"
> o conf commit
>
> It turned out that MediaWiki::Bot requires bunch of other modules that
> cpan tries to install. But I see that many of them fail test cases
> because they cannot detect each other. For example,
>
> # Failed test at t/warnings_exist.t line 36.
> # got: 'Base class package "Tree::DAG_Node" is empty.'
>

That's because they're not in Perl's @INC path.

Please use local::lib for that:

https://metacpan.org/module/local::lib

See:

http://perl-begin.org/topics/cpan/

Regards,

Shlomi Fish

-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
My Aphorisms - http://www.shlomifish.org/humour.html
An original philosopher knows the right combination of ideas to steal.
Please reply to list if it's a mailing list post - http://shlom.in/reply .


Previous Thread: Send email with perl 587 and startssl
Next Thread: Ownership of a file in unix file system

Related Forum Topics
Install modules from CPAN
--e89a8f23524166ec9b04bb41a539
Content-Type: text/plain; charset=ISO-8859-1

Hi there,
i have perl 5.6 on my laptop
am i want to download some modules from CPAN but all attempts i have made
have failed giving me such errors,
some help.

C:\>perl -MCPAN -e shell
cpan shell -- CPAN...
Can only install cpan modules as sudo
--B_3407311651_792059
Content-type: text/plain;
charset="US-ASCII"
Content-transfer-encoding: 7bit

Hi all,

I can only install cpan modules as sudo. I installed ActiveState Perl
v.5.14.2 and cpanm without a problem.

$ cpanm Net::SMTP
-bash: /usr/local/bin/cpanm: /usr/bin/perl: bad...
FW: can only install cpan modules as sudo
---814414838-151221274-1324685983=:26988
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable



--- On Fri, 12/23/11, Phil Dobbin <phildobbin@gmail.com> wrote:

From: Phil Dobbin <phildobbin@gmail.com>
Subject: FW: can only install cpan modules as...
Re: need to include and install CPAN modules as part of applicationstack
--_----------=_129660073129400
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"
Date: Tue, 1 Feb 2011 17:52:11 -0500
X-Mailer: MessagingEngine.com Webmail Interface

With all due respect Uri, you're not being particularly friendly.
This is a...
Need to include and install CPAN modules as part of application stack
------_=_NextPart_001_01CBBE65.E08A1034
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hello all,

=20

=20

I need to include CPAN modules as part of our custom "application
stack".

=20

Currently we have a custom "application stack"...
Problems with install modules with CPAN and from source code when I update my PERL
------=_Part_91860_3534319.1231880100387
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi everybody

thanks for read....

I have a problem with CPAN, the problem is becouse I change my PERL
version...

Well First create in my...
CPAN won't install YAML and others
Greetings;

YAML is not installed on my Lenny system and when I try to
install it (with perl -MCPAN -e shell) I get the following
errors after the source has been unpacked. Any ideas?

Thanks for any help!
Dennis

BTW :
> cardinal:~# ls -l...
Trying to install a cpan module
--001636c5baf9aa293804961729cc
Content-Type: text/plain; charset=ISO-8859-1

Hi all,

I'm new to programming, and only recently did I start playing around with
command prompts, etc, so it's probably no surpise that I'm having some
difficulty trying to install a module using cpan. The...
How to install modules
------=_NextPart_000_0157_01C8C303.BA8D74D0
Content-Type: text/plain;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable

Hi,
I tried to install the module plot.pm, by following the undermentioned =
method http://www.base64.co.uk/installing-perl-modules/ but I failed. =
What...
Is there a way to un-install modules?
I know this is going to sound odd, but I've installed some modules using
the CPAN module and I now want to uninstall them or put them into a
state where they are no longer detected. Is there a way to do this?

TIA

Bruce