CPAN and man page installation

Discussion in 'Perl Misc' started by Vincent Lefevre, Feb 24, 2008.

  1. With the cpan utility, what configuration option need to be modified
    to install the man pages of modules at some place?

    Installation currently fails with the following error:

    mkdir /usr/local/man/man3: Permission denied at /usr/share/perl/5.8/ExtUtils/Install.pm line 112

    So, I need to tell cpan to install the man pages in ~/man/man1
    and ~/man/man3.

    --
    Vincent Lefèvre <> - Web: <http://www.vinc17.org/>
    100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
    Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
    Vincent Lefevre, Feb 24, 2008
    #1
    1. Advertising

  2. Vincent Lefevre

    Ben Morrow Guest

    Quoth Vincent Lefevre <>:
    > With the cpan utility, what configuration option need to be modified
    > to install the man pages of modules at some place?
    >
    > Installation currently fails with the following error:
    >
    > mkdir /usr/local/man/man3: Permission denied at
    > /usr/share/perl/5.8/ExtUtils/Install.pm line 112
    >
    > So, I need to tell cpan to install the man pages in ~/man/man1
    > and ~/man/man3.


    export PERL_MM_OPT="INSTALLMAN1DIR=$HOME/man/man1
    INSTALLMAN3DIR=$HOME/man/man3"

    See perldoc ExtUtils::MakeMaker for full details. For Module::Build
    modules, you need to create a ~/.modulebuildrc file containing

    * bindoc=~/man/man1 libdoc=~/man/man3

    Ben
    Ben Morrow, Feb 24, 2008
    #2
    1. Advertising

  3. In article <>,
    Ben Morrow <> wrote:

    > export PERL_MM_OPT="INSTALLMAN1DIR=$HOME/man/man1
    > INSTALLMAN3DIR=$HOME/man/man3"


    I've added

    $ENV{'PERL_MM_OPT'} = 'INSTALLMAN1DIR=~/man/man1 INSTALLMAN3DIR=~/man/man3';

    to my .cpan/CPAN/MyConfig.pm file, but I still get the same error.
    It seems that this environment variable isn't taken into account.

    FYI, I already have the following:

    cpan> o conf
    CPAN::Config options and /home/vlefevre/.cpan/CPAN/MyConfig.pm:
    commit Commit changes to disk
    defaults Reload defaults from disk
    init Interactive setting of all options

    build_cache 10
    build_dir /home/vlefevre/.cpan/build
    bzip2 /bin/bzip2
    cache_metadata 1
    cpan_home /home/vlefevre/.cpan
    curl /usr/bin/curl
    dontload_hash
    ftp /usr/bin/ftp
    ftp_passive 1
    ftp_proxy
    getcwd cwd
    gpg /usr/bin/gpg
    gzip /bin/gzip
    histfile /home/vlefevre/.cpan/histfile
    histsize 100
    http_proxy
    inactivity_timeout 0
    index_expire 1
    inhibit_startup_message 0
    installman1dir /home/vlefevre/man/man1
    installman3dir /home/vlefevre/man/man3
    keep_source_where /home/vlefevre/.cpan/sources
    lynx /usr/bin/lynx
    make /usr/bin/make
    make_arg -j2
    make_install_arg UNINST=1
    make_install_make_command /usr/bin/make
    makepl_arg LIB=~/lib/site_perl INSTALLMAN1DIR=~/man/man1 INSTALLMAN3DIR=~/man/man3
    mbuild_arg
    mbuild_install_arg --uninst 1
    mbuild_install_build_command ./Build
    mbuildpl_arg
    ncftpget /usr/bin/ncftpget
    no_proxy
    pager less -is
    prefer_installer EUMM
    prerequisites_policy ask
    scan_cache atstart
    shell /usr/bin/zsh
    show_upload_date 1
    tar /bin/tar
    term_is_latin 1
    unzip /usr/bin/unzip
    urllist
    http://cpan.cict.fr/
    http://cpan.mirrors.easynet.fr/
    ftp://ftp.pasteur.fr/pub/computing/CPAN/
    ftp://ftp.u-strasbg.fr/CPAN
    wget /usr/bin/wget

    --
    Vincent Lefèvre <> - Web: <http://www.vinc17.org/>
    100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
    Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
    Vincent Lefevre, Feb 24, 2008
    #3
  4. In article <20080224012425$17.org>,
    Vincent Lefevre <> wrote:

    > With the cpan utility, what configuration option need to be modified
    > to install the man pages of modules at some place?


    > Installation currently fails with the following error:


    > mkdir /usr/local/man/man3: Permission denied at /usr/share/perl/5.8/ExtUtils/Install.pm line 112


    > So, I need to tell cpan to install the man pages in ~/man/man1
    > and ~/man/man3.


    I've debugged this a bit. After the failure of Compress::Raw::Bzip2
    installation, /home/vlefevre/.cpan/build/Compress-Raw-Bzip2-2.008/Makefile
    contains:

    INSTALLMAN1DIR = /home/vlefevre/man/man1
    INSTALLMAN3DIR = /home/vlefevre/man/man3

    as expected, but in fact, these variables are not taken into account,
    probably because the Makefile also has:

    INSTALLDIRS = site
    DESTDIR =
    PREFIX = /usr
    PERLPREFIX = $(PREFIX)
    SITEPREFIX = $(PREFIX)/local

    The following is OK:

    INSTALLSITELIB = /home/vlefevre/lib/site_perl

    but why do I get the following values in the Makefile?

    INSTALLSITEMAN1DIR = $(SITEPREFIX)/man/man1
    INSTALLSITEMAN3DIR = $(SITEPREFIX)/man/man3

    Then, the command

    make install NOECHO=''

    gives:

    ------------------------------------------------------------------------
    /bin/sh -c true
    /bin/sh -c true
    /bin/sh -c true
    /bin/sh -c true
    /bin/sh -c true
    /bin/sh -c true
    /usr/bin/perl "-MExtUtils::Command::MM" -e pod2man "--" --section=3pm --perm_rw=644 \
    lib/Compress/Raw/Bzip2.pm blib/man3/Compress::Raw::Bzip2.3pm
    /bin/sh -c true
    umask 02; /usr/bin/perl -MExtUtils::Install -e 'install({@ARGV}, '\''0'\'', 0, '\''0'\'');' \
    read /usr/local/lib/perl/5.8.8/auto/Compress/Raw/Bzip2/.packlist \
    write /home/vlefevre/lib/site_perl/x86_64-linux-gnu-thread-multi/auto/Compress/Raw/Bzip2/.packlist \
    blib/lib /home/vlefevre/lib/site_perl \
    blib/arch /home/vlefevre/lib/site_perl/x86_64-linux-gnu-thread-multi \
    blib/bin /usr/local/bin \
    blib/script /usr/local/bin \
    blib/man1 /usr/local/man/man1 \
    blib/man3 /usr/local/man/man3
    mkdir /usr/local/man/man3: Permission denied at /usr/share/perl/5.8/ExtUtils/Install.pm line 112
    make: *** [pure_site_install] Error 13
    ------------------------------------------------------------------------

    If I add INSTALLDIRS=perl to makepl_arg in .cpan/CPAN/MyConfig.pm
    (I recall I already had "LIB=~/lib/site_perl INSTALLMAN1DIR=~/man/man1
    INSTALLMAN3DIR=~/man/man3"), then everything is OK. This is *really*
    confusing and seems to be documented nowhere!

    --
    Vincent Lefèvre <> - Web: <http://www.vinc17.org/>
    100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
    Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
    Vincent Lefevre, Feb 27, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jaap Karssenberg

    conflict between man perlipc and man perlfunc !?

    Jaap Karssenberg, Jan 9, 2004, in forum: Perl Misc
    Replies:
    0
    Views:
    155
    Jaap Karssenberg
    Jan 9, 2004
  2. carl d.
    Replies:
    1
    Views:
    382
    A. Sinan Unur
    May 10, 2005
  3. Replies:
    5
    Views:
    199
    Randy Kobes
    Oct 12, 2005
  4. PerlFAQ Server
    Replies:
    0
    Views:
    167
    PerlFAQ Server
    Jan 24, 2011
  5. PerlFAQ Server
    Replies:
    0
    Views:
    174
    PerlFAQ Server
    Mar 7, 2011
Loading...

Share This Page