where to install cpan modules 
Author Message
 where to install cpan modules

I've installed CPAN modules before, but that was back when I was a
windows user and had an activestate install, which was, btw, an
excellent software product, given the platform it runs on.

It was always important to put modules in the right place.  I'm trying
to figure out what that place is, and in the CPAN faqs, is says I can
divine it from the following command:

# perl -V
Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
   Platform:
     osname=linux, osvers=2.6.24-23-server,
archname=i486-linux-gnu-thread-multi
     uname='linux rothera 2.6.24-23-server #1 smp wed apr 1 22:22:14 utc
2009 i686 gnulinux '
     config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN
-Dcccdlflags=-fPIC -Darchname=i486-linux-gnu -Dprefix=/usr
-Dprivlib=/usr/share/perl/5.10 -Darchlib=/usr/lib/perl/5.10
-Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5
-Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local
-Dsitelib=/usr/local/share/perl/5.10.0
-Dsitearch=/usr/local/lib/perl/5.10.0 -Dman1dir=/usr/share/man/man1
-Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1
-Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl
-Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Ud_ualarm -Uusesfio
-Uusenm -DDEBUGGING=-g -Doptimize=-O2 -Duseshrplib
-Dlibperl=libperl.so.5.10.0 -Dd_dosuid -des'
     hint=recommended, useposix=true, d_sigaction=define
     useithreads=define, usemultiplicity=define
     useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
     use64bitint=undef, use64bitall=undef, uselongdouble=undef
     usemymalloc=n, bincompat5005=undef
   Compiler:
     cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
     optimize='-O2 -g',
     cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing
-pipe -I/usr/local/include'
     ccversion='', gccversion='4.3.3', gccosandvers=''
     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
     ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
     alignbytes=4, prototype=define
   Linker and Libraries:
     ld='cc', ldflags =' -L/usr/local/lib'
     libpth=/usr/local/lib /lib /usr/lib /usr/lib64
     libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
     perllibs=-ldl -lm -lpthread -lc -lcrypt
     libc=/lib/libc-2.9.so, so=so, useshrplib=true,
libperl=libperl.so.5.10.0
     gnulibc_version='2.9'
   Dynamic Linking:
     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
     cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib'

Characteristics of this binary (from libperl):
   Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
                         PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_ITHREADS
                         USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API
   Built under linux
   Compiled at Jun 26 2009 18:23:00

     /etc/perl
     /usr/local/lib/perl/5.10.0
     /usr/local/share/perl/5.10.0
     /usr/lib/perl5
     /usr/share/perl5
     /usr/lib/perl/5.10
     /usr/share/perl/5.10
     /usr/local/lib/site_perl
     .
#
# end terminal output, resume comment

The answer's probably sitting right of nose, but I can't tell which one
it is.

Thanks for your comment,
--
John smith



Tue, 02 Apr 2013 22:35:21 GMT  
 where to install cpan modules

Quote:

> It was always important to put modules in the right place.

Yes, it is.

Quote:
> I'm trying to figure out what that place is

Why? MakeMaker & Module::Build already know how to put things where
they belong. You only need to hold their hands if you want to force them
to put things in the *wrong* place. :-)

sherm--

--
Sherm Pendley
                                   <http://camelbones.sourceforge.net>
Cocoa Developer



Tue, 02 Apr 2013 23:11:42 GMT  
 where to install cpan modules

Quote:


>> It was always important to put modules in the right place.

> Yes, it is.

>> I'm trying to figure out what that place is

> Why? MakeMaker & Module::Build already know how to put things where
> they belong. You only need to hold their hands if you want to force them
> to put things in the *wrong* place. :-)

Well, Sherm, I thank you for your comment, but it may have motivated me

(When I{*filter*}up, there's usually a few paragraphs between where I
started and how the fire department had to come.)

So, I thought /usr/share/perl looks like a good place because I want to
share perl among users.  It went like this:

$ pwd
/usr/share/perl
$ cd ..
$ ls -ald perl
drwxr-xr-x 3 root root 4096 2009-04-20 07:59 perl
$ sudo chmod o=rw perl
[sudo] password for ron:
$ ls -ald perl
drwxr-xrw- 3 root root 4096 2009-04-20 07:59 perl
$

So now I have write priveleges, but now that I do, when I run perl -V,
my interpreter can't discover the meaning of strict, so I think this
evidences of the above eluded-to pooch-screw:

$ perl -V

/usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10
/usr/local/lib/site_perl .) at /usr/lib/perl/5.10/Config.pm line 5.
BEGIN failed--compilation aborted at /usr/lib/perl/5.10/Config.pm line 5.
Compilation failed in require.
BEGIN failed--compilation aborted.
$

So, what great thing have I done here?
--
John Smith



Wed, 03 Apr 2013 01:10:06 GMT  
 where to install cpan modules

Quote:



>>> It was always important to put modules in the right place.

>> Yes, it is.

>>> I'm trying to figure out what that place is

>> Why? MakeMaker & Module::Build already know how to put things where
>> they belong. You only need to hold their hands if you want to force them
>> to put things in the *wrong* place. :-)

> Well, Sherm, I thank you for your comment, but it may have motivated
> me to{*filter*}the pooch.  I thought, "ok, I'll choose one of those paths

> (When I{*filter*}up, there's usually a few paragraphs between where I
> started and how the fire department had to come.)

In this case, there isn't. The very first paragraph explains it - you
are doing things by hand, when a perfectly cromulent and entirely
automated means of doing them exists.

At a shell prompt, type:

  $ sudo cpan Module::Name

And you're done.

sherm--

--
Sherm Pendley
                                   < http://www.*-*-*.com/ >
Cocoa Developer



Wed, 03 Apr 2013 01:39:36 GMT  
 where to install cpan modules

Quote:




>>>> It was always important to put modules in the right place.

>>> Yes, it is.

>>>> I'm trying to figure out what that place is

>>> Why? MakeMaker & Module::Build already know how to put things where
>>> they belong. You only need to hold their hands if you want to force them
>>> to put things in the *wrong* place. :-)

>> Well, Sherm, I thank you for your comment, but it may have motivated
>> me to{*filter*}the pooch.  I thought, "ok, I'll choose one of those paths

>> (When I{*filter*}up, there's usually a few paragraphs between where I
>> started and how the fire department had to come.)

> In this case, there isn't. The very first paragraph explains it - you
> are doing things by hand, when a perfectly cromulent and entirely
> automated means of doing them exists.

> At a shell prompt, type:

>   $ sudo cpan Module::Name

> And you're done.

Oh, and if you *must* install a module by hand for some reason, have a
look at 'perldoc perlmodinstall' for instructions about how to do so.
I'll give you a hint - it doesn't involve simply copying stuff into some

sherm--

--
Sherm Pendley
                                   < http://www.*-*-*.com/ >
Cocoa Developer



Wed, 03 Apr 2013 01:42:27 GMT  
 where to install cpan modules


[ installing CPAN modules ]

Quote:

> Well, Sherm, I thank you for your comment, but it may have motivated me
> to{*filter*}the pooch.  I thought, "ok, I'll choose one of those paths in


No, no, that's quite wrong. If you're starting with a tarball, you untar
it somewhere temporary, and let the installer install it in the right
place. Better would be to use the cpan client directly.

Quote:
> So, I thought /usr/share/perl looks like a good place because I want to
> share perl among users.

I would not recommend installing modules by hand into a perl tree
managed by your system package manager. That way lies much confusion
when you come to upgrade. Either use the package manager to install the
modules you need (if they're available), compile your own perl that
lives somewhere else (I tend to use /opt/perl; I would install perl like
this:

    % tar -xzvf perl-5.12.2.tar.gz
    % cd perl-5.12.2
    % ./Configure -des -Dprefix=/opt/perl -Uinstallusrbinperl
        -Dman1dir=none -Dman3dir=none -Dinc_version_list=none
        -Dusemymalloc=y -Duse64bitint -Ud_dosuid
    % make && make test
    # make install

) or install and use local::lib.

Quote:
> It went like this:

> $ pwd
> /usr/share/perl
> $ cd ..
> $ ls -ald perl
> drwxr-xr-x 3 root root 4096 2009-04-20 07:59 perl
> $ sudo chmod o=rw perl

*WHAT?* That is a completely insane thing to do. I hope noone but you
uses or has access to this machine...

You should never make a perl module directory world-writable. It is an
*enormous* security hole. Directories for your own use only should be
owned by you, global directories should be owned by root, and neither
should be world-writable.

You have also taken the other-execute bit off. Do you know what that
does?

Quote:
> [sudo] password for ron:
> $ ls -ald perl
> drwxr-xrw- 3 root root 4096 2009-04-20 07:59 perl
> $

> So now I have write priveleges, but now that I do, when I run perl -V,
> my interpreter can't discover the meaning of strict, so I think this
> evidences of the above eluded-to pooch-screw:

Well, yeah. You took the other-execute bit off.

Wipe out all that and reinstall it with your package manager. Then see
if you can install what you want with said package manager. If not, read
the docs for local::lib on search.cpan.org and use that.

Ben



Wed, 03 Apr 2013 02:01:34 GMT  
 where to install cpan modules

Quote:


> [ installing CPAN modules ]
>> Well, Sherm, I thank you for your comment, but it may have motivated me
>> to{*filter*}the pooch.  I thought, "ok, I'll choose one of those paths in

> No, no, that's quite wrong. If you're starting with a tarball, you untar
> it somewhere temporary, and let the installer install it in the right
> place. Better would be to use the cpan client directly.

Ok.

Quote:

>> So, I thought /usr/share/perl looks like a good place because I want to
>> share perl among users.

> I would not recommend installing modules by hand into a perl tree
> managed by your system package manager. That way lies much confusion
> when you come to upgrade. Either use the package manager to install the
> modules you need (if they're available), compile your own perl that
> lives somewhere else (I tend to use /opt/perl; I would install perl like
> this:

>     % tar -xzvf perl-5.12.2.tar.gz
>     % cd perl-5.12.2
>     % ./Configure -des -Dprefix=/opt/perl -Uinstallusrbinperl
>         -Dman1dir=none -Dman3dir=none -Dinc_version_list=none
>         -Dusemymalloc=y -Duse64bitint -Ud_dosuid
>     % make && make test
>     # make install

> ) or install and use local::lib.

I haven't gotten this far yet, as I've simply been repairing the damage.

Quote:

>> It went like this:

>> $ pwd
>> /usr/share/perl
>> $ cd ..
>> $ ls -ald perl
>> drwxr-xr-x 3 root root 4096 2009-04-20 07:59 perl
>> $ sudo chmod o=rw perl

> *WHAT?* That is a completely insane thing to do. I hope noone but you
> uses or has access to this machine...

I'm just a cowboy on a keyboard, but the whole idea is that I've created
another user on ubuntu to see how things work.  It's been the most
eye-opening thing I've done on linux yet.

Einstein defined insanity as doing the same thing repeatedly and
expecting different results.  As I have only done this once, this fails
to meet his criterion.

Quote:

> You should never make a perl module directory world-writable. It is an
> *enormous* security hole. Directories for your own use only should be
> owned by you, global directories should be owned by root, and neither
> should be world-writable.

Ok.

Quote:

> You have also taken the other-execute bit off. Do you know what that
> does?

Yeah, it causes the perl interpreter to be unable to find the meaning of
strict, which is the most fundamental of pragmata.

I wanted to add rw to owner, so what I should have done is
chmod o=rwx perl
, but of course, I shouldn't have changed this permission to begin with.

The execution of
perl -V
requires the pragma strict found here:

# locate strict.pm
/usr/share/perl/5.10.0/strict.pm

# ls -l strict.pm
-rw-r--r-- 1 root root 879 2009-06-26 13:03 strict.pm

As I look at it now, I think I just have to generally say that if you
lose the execution bit for owner on usr/local/perl, the perl compiler
cannot leave square one.

Quote:

>> [sudo] password for ron:
>> $ ls -ald perl
>> drwxr-xrw- 3 root root 4096 2009-04-20 07:59 perl
>> $

>> So now I have write priveleges, but now that I do, when I run perl -V,
>> my interpreter can't discover the meaning of strict, so I think this
>> evidences of the above eluded-to pooch-screw:

> Well, yeah. You took the other-execute bit off.

> Wipe out all that and reinstall it with your package manager. Then see
> if you can install what you want with said package manager. If not, read
> the docs for local::lib on search.cpan.org and use that.

I'm gonna see if I can do it off the command line first.

Thanks for your help, Ben.  I like to think that my screw-ups with
permissions don't evidence of the same mistake because the underlying
task is usually different.
--
John Smith



Wed, 03 Apr 2013 20:43:03 GMT  
 where to install cpan modules

[warning: long post]
[might be a little OT with some python talk]
[I promise not to dwell on it.]

Quote:
> At a shell prompt, type:

>   $ sudo cpan Module::Name

> And you're done.

Thanks for your comment, Sherm.

I did
# cpan Wiki::Gateway
.  It was *definitely* on a roll.  You get warnings here and there, but
where I think this process jumped the shark was when it couldn't find
headers for python.

After that, I got into a loop that was always asking me about my python
install, which is almost certainly equivalent to whatever is untouched
out of the ubuntu jaunty box for python.

The terminal session went on so long that I can't capture it.  I can
capture the parts where things were going wrong repetatively and
circularly.  I include the terminal session from an approximate midpoint
to the end after the sig of this message.

Whatever software I invoked was pretty specific:
...
This python's configuration files are messed up. You'll have have to
answer the questions yourself. Here is what Python said:
....

I think everyone agrees with me, that the notion of me going in unawares
and "fixing it," would all but guarantee a ten-fold setback.

I would a appreciate a couple opinions on how I might proceed.

What a great day to be putzing around at one's own house.  I'm planting
a tree.  What could go wrong?
--
John Smith

Begin terminal output where I think I began to err:

Running install for module 'Inline::Python'
'YAML' not installed, falling back to Data::Dumper and Storable to read
prefs '/root/.cpan/prefs'
Running make for N/NI/NINE/Inline-Python-0.37.tar.gz
Fetching with LWP:
   http://www.perl.org/CPAN/authors/id/N/NI/NINE/Inline-Python-0.37.tar.gz
Fetching with LWP:
   http://www.perl.org/CPAN/authors/id/N/NI/NINE/CHECKSUMS
Checksum for
/root/.cpan/sources/authors/id/N/NI/NINE/Inline-Python-0.37.tar.gz ok
Inline-Python-0.37/
Inline-Python-0.37/t/
Inline-Python-0.37/t/09bind.t
Inline-Python-0.37/t/08ipyobj.t
Inline-Python-0.37/t/19testref.t
Inline-Python-0.37/t/02testpl.t
Inline-Python-0.37/t/00init.t
Inline-Python-0.37/t/21arrayref.t
Inline-Python-0.37/t/28exception.t
Inline-Python-0.37/t/12evnodd.t
Inline-Python-0.37/t/30floats.t
Inline-Python-0.37/t/06dict.t
Inline-Python-0.37/t/29named_params.t
Inline-Python-0.37/t/27pyattrs.t
Inline-Python-0.37/t/22int.t
Inline-Python-0.37/t/14study.t
Inline-Python-0.37/t/05JAxH.t
Inline-Python-0.37/t/26undef.t
Inline-Python-0.37/t/24getitem.t
Inline-Python-0.37/t/10pyeval.t
Inline-Python-0.37/t/01testpl.t
Inline-Python-0.37/t/20unicode.t
Inline-Python-0.37/t/25py_sub.t
Inline-Python-0.37/t/17once.t
Inline-Python-0.37/t/07nherit.t
Inline-Python-0.37/t/11factor.t
Inline-Python-0.37/t/31stringification.t
Inline-Python-0.37/t/16evalpy.t
Inline-Python-0.37/t/18newclass.t
Inline-Python-0.37/t/15anon.t
Inline-Python-0.37/t/13fibbon.t
Inline-Python-0.37/t/23getattr.t
Inline-Python-0.37/t/04func.t
Inline-Python-0.37/t/03parse.t
Inline-Python-0.37/py2pl.h
Inline-Python-0.37/TESTED
Inline-Python-0.37/perlmodule.h
Inline-Python-0.37/ToDo
Inline-Python-0.37/Python.pm
Inline-Python-0.37/Python.xs
Inline-Python-0.37/Makefile.pre.in
Inline-Python-0.37/py2pl.c
Inline-Python-0.37/README
Inline-Python-0.37/META.yml
Inline-Python-0.37/Setup.in
Inline-Python-0.37/Changes
Inline-Python-0.37/Makefile.PL
Inline-Python-0.37/MANIFEST
Inline-Python-0.37/util.c
Inline-Python-0.37/perlmodule.c
Inline-Python-0.37/util.h
Inline-Python-0.37/Python.pod
Warning (usually harmless): 'YAML' not installed, will not store
persistent state

   CPAN.pm: Going to build N/NI/NINE/Inline-Python-0.37.tar.gz

Found these python executables on your PATH:
1. /usr/bin/python
2. /usr/X11R6/bin/python
Use which? [1] 1
Using /usr/bin/python

This python's configuration files are messed up. You'll have have to
answer the questions yourself. Here is what Python said:

    Extra Libs:  -lpthread -ldl  -lutil
    Python Library:  /usr/lib/python2.6/config/libpython2.6.a
    Include Path:    /usr/include/python2.6

        1. LIBS option. I need to know what extra libraries, if any,
           are required by this build of python. I recommend this:
           -lpthread -ldl  -lutil

Enter extra libraries (e.g. -lfoo -lbar) [-lpthread -ldl  -lutil]

        2. LIBRARY option. The location of the python library.
           Inline::Python needs to link against it to use Python.

        Here are the libraries I know about:

Which? Or enter another. [1] 1

        3. INCLUDE option. The location of the python include files.
           Inline::Python needs these to compile.

        Here are the locations I know about:
           1) /usr/include/python2.5
           2) /usr/include/python2.6

Which? Or enter another. [1] 1
Could not find Python.h in include path. make will not work at
Makefile.PL line 44, <STDIN> line 4.
Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site]
Warning (usually harmless): 'YAML' not installed, will not store
persistent state
   NINE/Inline-Python-0.37.tar.gz
   /usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK
Running make test
   Make had some problems, won't test
Running make install
   Make had some problems, won't install
Running make for B/BS/BSHANKS/Wiki-Gateway-0.001991.tar.gz
   Has already been unwrapped into directory
/root/.cpan/build/Wiki-Gateway-0.001991-rHVn1N

   CPAN.pm: Going to build B/BS/BSHANKS/Wiki-Gateway-0.001991.tar.gz

Warning: Prerequisite 'Inline::Python => 0' for
'B/BS/BSHANKS/Wiki-Gateway-0.001991.tar.gz' failed when processing
'N/NI/NINE/Inline-Python-0.37.tar.gz' with 'writemakefile => NO
'/usr/bin/perl Makefile.PL INSTALLDIRS=site' returned status 512'.
Continuing, but chances to succeed are limited.
/usr/bin/perl -Iinc Makefile.PL --config= --installdeps=Inline::Python,0
*** Installing dependencies...
[MSG] No '/root/.cpanplus/custom-sources' dir, skipping custom sources
[MSG] No '/root/.cpanplus/custom-sources' dir, skipping custom sources
[MSG] No '/root/.cpanplus/custom-sources' dir, skipping custom sources
*** Installing Inline::Python...
Running [/usr/bin/perl /usr/bin/cpanp-run-perl
/root/.cpanplus/5.10.0/build/Inline-Python-0.37/Makefile.PL ]...
Found these python executables on your PATH:
1. /usr/bin/python
2. /usr/X11R6/bin/python
Use which? [1] 2
Using /usr/X11R6/bin/python

This python's configuration files are messed up. You'll have have to
answer the questions yourself. Here is what Python said:

    Extra Libs:  -lpthread -ldl  -lutil
    Python Library:  /usr/lib/python2.6/config/libpython2.6.a
    Include Path:    /usr/include/python2.6

        1. LIBS option. I need to know what extra libraries, if any,
           are required by this build of python. I recommend this:
           -lpthread -ldl  -lutil

Enter extra libraries (e.g. -lfoo -lbar) [-lpthread -ldl  -lutil]

        2. LIBRARY option. The location of the python library.
           Inline::Python needs to link against it to use Python.

        Here are the libraries I know about:

Which? Or enter another. [1] 2

        3. INCLUDE option. The location of the python include files.
           Inline::Python needs these to compile.

        Here are the locations I know about:
           1) /usr/include/python2.5
           2) /usr/include/python2.6

Which? Or enter another. [1] 2
Could not find Python.h in include path. make will not work at
/root/.cpanplus/5.10.0/build/Inline-Python-0.37/Makefile.PL line 44,
<STDIN> line 4.
[ERROR] Could not run '/usr/bin/perl Makefile.PL': Found these python
executables on your PATH:
1. /usr/bin/python
2. /usr/X11R6/bin/python
Use which? [1] Using /usr/X11R6/bin/python

This python's configuration files are messed up. You'll have have to
answer the questions yourself. Here is what Python said:

    Extra Libs:  -lpthread -ldl  -lutil
    Python Library:  /usr/lib/python2.6/config/libpython2.6.a
    Include Path:    /usr/include/python2.6

        1. LIBS option. I need to know what extra libraries, if any,
           are required by this build of python. I recommend this:
           -lpthread -ldl  -lutil

Enter extra libraries (e.g. -lfoo -lbar) [-lpthread -ldl  -lutil]
        2. LIBRARY option. The location of the python library.
           Inline::Python needs to link against it to use Python.

        Here are the libraries I know about:

Which? Or enter another. [1]
        3. INCLUDE option. The location of the python include files.
           Inline::Python needs these to compile.

        Here are the locations I know about:
           1) /usr/include/python2.5
           2) /usr/include/python2.6

Which? Or enter another. [1] Could not find Python.h in include path.
make will not work at
/root/.cpanplus/5.10.0/build/Inline-Python-0.37/Makefile.PL line 44,
<STDIN> line 4.
  -- cannot continue

[ERROR] Unable to create a new distribution object for 'Inline::Python'
-- cannot continue

Key 'ok' () is of invalid type for 'CPANPLUS::Backend::RV::new' provided
by CPANPLUS::Backend::__ANON__ at
/usr/share/perl/5.10/CPANPLUS/Backend.pm line 395
*** Inline::Python installation cancelled.
*** ExtUtils::AutoInstall installation finished.
cp lib/Wiki/Gateway.pm blib/lib/Wiki/Gateway.pm
Manifying blib/man3/Wiki::Gateway.3pm
   BSHANKS/Wiki-Gateway-0.001991.tar.gz
   /usr/bin/make -- OK
Warning (usually harmless): 'YAML' not installed, will not store
persistent state
Running make test
/usr/bin/perl -Iinc Makefile.PL --config= --installdeps=Inline::Python,0
*** Installing dependencies...
[MSG] No '/root/.cpanplus/custom-sources' dir, skipping custom sources
*** Installing Inline::Python...
Running [/usr/bin/perl /usr/bin/cpanp-run-perl
/root/.cpanplus/5.10.0/build/Inline-Python-0.37/Makefile.PL ]...
Found these python executables on your PATH:
1. /usr/bin/python
2. /usr/X11R6/bin/python
Use which? [1] 2
Using /usr/X11R6/bin/python

This python's configuration files are messed up. You'll have have to
answer the questions yourself. Here is what Python said:

    Extra Libs:  -lpthread -ldl  -lutil
    Python Library:  /usr/lib/python2.6/config/libpython2.6.a
    Include Path:    /usr/include/python2.6

        1. LIBS option. I need to know what extra libraries, if any,
           are required by this build of python. I
...

read more »



Wed, 03 Apr 2013 21:18:40 GMT  
 where to install cpan modules

Quote:

> Could not find Python.h in include path. make will not work at
> Makefile.PL line 44, <STDIN> line 4.

Many Linux distros split things into separate -dev and sometimes -doc
packages for development & documentation related files, respectively.
So even though your system has enough of Python installed to run .py
scripts, it may not have enough to compile C extensions for it. Use your
package manager to see what package provides Python.h, and to make
sure that package has been installed.

sherm--

--
Sherm Pendley
                                   <http://camelbones.sourceforge.net>
Cocoa Developer



Wed, 03 Apr 2013 21:30:43 GMT  
 where to install cpan modules


Quote:

> > You have also taken the other-execute bit off. Do you know what that
> > does?

> Yeah, it causes the perl interpreter to be unable to find the meaning of
> strict, which is the most fundamental of pragmata.

I meant more generally. The execute bit on a directory means 'you can
lookup files within this directory'. If you take the execute bit off all
files under that directory become inaccessible.

Quote:
> > Wipe out all that and reinstall it with your package manager. Then see
> > if you can install what you want with said package manager. If not, read
> > the docs for local::lib on search.cpan.org and use that.

> I'm gonna see if I can do it off the command line first.

You will find you have a chicken-and-egg problem here: in order to set
up a private module directory, you need to install local::lib; in order
to install local::lib, you need somewhere to install it. local::lib has
a bootstrap procedure for getting around this, which is documented in
its docs. Until you have the module installed, it's easier to read them
on search.cpan.org than by poking around in the tarball.

Quote:
> Thanks for your help, Ben.  I like to think that my screw-ups with
> permissions don't evidence of the same mistake because the underlying
> task is usually different.

IMHO you keep making the same mistake: you go at something without any
understanding of how it works, and blunder around doing random things
until something appears to do what you wanted. This is not a sensible
way to use a computer: they are designed to make sense, so if things
aren't making sense you're using them wrong.

Ben



Wed, 03 Apr 2013 21:59:31 GMT  
 where to install cpan modules


Quote:

> Running install for module 'Inline::Python'

Start with something simpler. Inline and Inline::Python are both deep
magic.

Ben



Wed, 03 Apr 2013 22:01:49 GMT  
 where to install cpan modules

Quote:

> $ pwd
> /usr/share/perl
> $ cd ..
> $ ls -ald perl
> drwxr-xr-x 3 root root 4096 2009-04-20 07:59 perl
> $ sudo chmod o=rw perl
> [sudo] password for ron:
> $ ls -ald perl
> drwxr-xrw- 3 root root 4096 2009-04-20 07:59 perl
> $

> So now I have write priveleges, but now that I do, when I run perl -V,
> my interpreter can't discover the meaning of strict, so I think this
> evidences of the above eluded-to pooch-screw:

> $ perl -V

> /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5
> /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10
> /usr/local/lib/site_perl .) at /usr/lib/perl/5.10/Config.pm line 5.
> BEGIN failed--compilation aborted at /usr/lib/perl/5.10/Config.pm line 5.
> Compilation failed in require.
> BEGIN failed--compilation aborted.
> $

> So, what great thing have I done here?

I believe I have changed the one thing I did back to its original state:

  pwd
/usr/share
# ls -ald perl
drwxr-xr-x 3 root root 4096 2009-04-20 07:59 perl

(compares to:)
 > drwxr-xr-x 3 root root 4096 2009-04-20 07:59 perl

So Ben asks me what happened when I changed this permission.  I've got a
bit of a learning curve here, and I've been trying to figure of what my
OS is telling me, but I have trouble with some of it.

First, how am I too understand the output of this command?

# ls -a perl
.  ..  5.10  5.10.0
# man ls

(yes I manned it already)

Second, what is the difference between these two?
# ls -l perl
total 12
lrwxrwxrwx  1 root root     6 2009-12-13 18:06 5.10 -> 5.10.0
drwxr-xr-x 50 root root 12288 2010-10-08 23:11 5.10.0

--
John Smith



Wed, 03 Apr 2013 22:16:33 GMT  
 where to install cpan modules

Quote:


>> Running install for module 'Inline::Python'

> Start with something simpler. Inline and Inline::Python are both deep
> magic.

I already started, Ben, so there's no turning the dial back there.

$ pwd
/home/ron/perl/local-lib-1.006007
$  perl Makefile.PL --bootstrap
Dispatching deprecated method 'CPAN::Config::load' to CPAN::HandleConfig
*** Module::AutoInstall version 1.03
*** Checking for Perl dependencies...
[Core Features]
- ExtUtils::MakeMaker ...loaded. (6.42 >= 6.31)
- ExtUtils::Install   ...loaded. (1.44 >= 1.43)
- ExtUtils::CBuilder  ...loaded. (0.21)
- ExtUtils::ParseXS   ...loaded. (2.18_02)
- Module::Build       ...loaded. (0.280801 >= 0.28)
- CPAN                ...loaded. (1.9205 >= 1.82)
*** Module::AutoInstall configuration finished.
Writing Makefile for local::lib
$ make test && make install
cp lib/POD2/PT_BR/local/lib.pod blib/lib/POD2/PT_BR/local/lib.pod
cp lib/lib/core/only.pm blib/lib/lib/core/only.pm
cp lib/local/lib.pm blib/lib/local/lib.pm
cp lib/POD2/DE/local/lib.pod blib/lib/POD2/DE/local/lib.pod
PERL_DL_NONLAZY=1 /usr/bin/perl
-I/home/ron/perl5/lib/perl5/i486-linux-gnu-thread-multi
-I/home/ron/perl5/lib/perl5 "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/classmethod.t
t/coderefs_in_inc.t t/de-dup.t t/install.t t/lib-core-only.t t/pipeline.t
t/classmethod........Name "File::Spec::rel2abs" used only once: possible
typo at t/classmethod.t line 20.
t/classmethod........ok 1/0Attempting to create directory t/var/splat

Attempting to create file t/var/splat/.modulebuildrc
t/classmethod........ok

t/coderefs_in_inc....Attempting to create file
/home/ron/perl/local-lib-1.006007/t/test_local_lib-vDG4q/.modulebuildrc
t/coderefs_in_inc....ok

t/de-dup.............Attempting to create file
/home/ron/perl/local-lib-1.006007/t/test_local_lib-wx9KH/.modulebuildrc
t/de-dup.............ok

t/install............skipped
         all skipped: Install Capture::Tiny to test installation
t/lib-core-only......ok

t/pipeline...........ok

All tests successful, 1 test skipped.
Files=6, Tests=11,  0 wallclock secs ( 0.36 cusr +  0.06 csys =  0.42 CPU)
Manifying blib/man3/POD2::PT_BR::local::lib.3pm
Manifying blib/man3/lib::core::only.3pm
Manifying blib/man3/local::lib.3pm
Manifying blib/man3/POD2::DE::local::lib.3pm
Installing /home/ron/perl5/lib/perl5/lib/core/only.pm
Installing /home/ron/perl5/lib/perl5/POD2/PT_BR/local/lib.pod
Installing /home/ron/perl5/lib/perl5/POD2/DE/local/lib.pod
Installing /home/ron/perl5/lib/perl5/local/lib.pm
Installing /home/ron/perl5/man/man3/lib::core::only.3pm
Installing /home/ron/perl5/man/man3/local::lib.3pm
Installing /home/ron/perl5/man/man3/POD2::DE::local::lib.3pm
Installing /home/ron/perl5/man/man3/POD2::PT_BR::local::lib.3pm
Writing
/home/ron/perl5/lib/perl5/i486-linux-gnu-thread-multi/auto/local/lib/.packlist
Appending installation info to
/home/ron/perl5/lib/perl5/i486-linux-gnu-thread-multi/perllocal.pod
$ echo 'eval $(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)' >>~/.bashrc
$

The way I read it, I was done here.

http://search.cpan.org/~getty/local-lib-1.006007/lib/local/lib.pm

What more must I do, because it fails 751 out of 752 tests every time?



Wed, 03 Apr 2013 23:33:00 GMT  
 where to install cpan modules

Quote:


>> Could not find Python.h in include path. make will not work at
>> Makefile.PL line 44, <STDIN> line 4.

> Many Linux distros split things into separate -dev and sometimes -doc
> packages for development & documentation related files, respectively.
> So even though your system has enough of Python installed to run .py
> scripts, it may not have enough to compile C extensions for it. Use your
> package manager to see what package provides Python.h, and to make
> sure that package has been installed.

I think I made some good choices here, but I didn't succeed:

http://i53.tinypic.com/158850p.png

http://i55.tinypic.com/24zgd2f.png

http://i56.tinypic.com/f9f9mx.png

--
John Smith



Wed, 03 Apr 2013 23:49:22 GMT  
 where to install cpan modules

Quote:

>[...] computer [...] are designed to make sense

Ohhhh, I know many many people who would strongly disagree with this
statement ;-)

jue



Thu, 04 Apr 2013 00:00:07 GMT  
 
 [ 25 post ]  Go to page: [1] [2]

 Relevant Pages 

1. Help!!!! Prob during install CPAN modules

2. Problem installing CPAN modules

3. Compile and install CPAN modules on win32

4. Can't install CPAN module

5. newbie: howto install CPAN module in my home

6. Pitfalls installing CPAN modules on DOS

7. problems installing CPAN modules on Win98, using nmake

8. Can't load IO.so error when trying to install CPAN modules

9. how to install CPAN modules (LWP)?

10. Problem installing CPAN modules

11. where is your email address cached? (while installing CPAN modules)

12. module install problems with cpan module and gcc?

 

 
Powered by phpBB® Forum Software