I was trying to install a module in my own directory via cpan (tried with perl 5.16.3 on CentOS 7; perl 5.30.0 on FreeBSD 12) but failed because install process tried to install Text::Table and Text::Aligner dependencies in a system wide directory (/usr/local) not writable by me as a lowly non-root user.

I had checked that the right directory had been specified for both Build.PL & Makefile.PL. What am I missing in the CPAN configuration file?

cpan[2]> o conf /make|build|install/ $CPAN::Config options from /home/parv/.cpan/CPAN/MyConfig.pm: build_cache [100] build_dir [/home/parv/.cpan/build] build_dir_reuse [0] build_requires_install_policy [yes] cleanup_after_install undef make [/usr/bin/make] make_arg [] make_install_arg [PREFIX=/home/parv/test-perl5] make_install_make_command [/usr/bin/make] makepl_arg [PREFIX=/home/parv/test-perl5] mbuild_arg [--install_base /home/parv/test-perl5] mbuild_install_arg [] mbuild_install_build_command [./Build] mbuildpl_arg [] prefer_installer [MB]
# cpan client - FAILED on CentOS & FreeBSD. . . .---- JETTERO/Term-ANSIColorx-ColorNicknames-2.7191.tar.gz ---- Text::Table [requires] Running install for module 'Text::Table' . . . Building Text-Table SHLOMIF/Text-Table-1.133.tar.gz ./Build --install_base /home/parv/test-perl5 --prefix /home/parv/tes +t-perl5 --install_base /home/parv/test-perl5 --prefix /home/parv/test +-perl5 -- OK Running Build test for SHLOMIF/Text-Table-1.133.tar.gz . . . Result: PASS SHLOMIF/Text-Table-1.133.tar.gz ./Build test -- OK Running Build install for SHLOMIF/Text-Table-1.133.tar.gz Building Text-Table !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!! ERROR: Can't create '/usr/local/lib/perl5/site_perl/Text' mkdir /usr/local/lib/perl5/site_perl/Text: Permission denied at /usr/l +ocal/lib/perl5/5.30/ExtUtils/Install.pm line 489.
# Manually issued command - SUCCEEDED on FreeBSD (hadn't tried on Cent +OS yet). perl Build.PL --install_base /home/parv/test-perl5/ && ./Build && ./Bu +ild test && ./Build install Created MYMETA.yml and MYMETA.json Creating new 'Build' script for 'Text-Table' version '1.133' Building Text-Table . . . Result: PASS Building Text-Table Installing /home/parv/test-perl5/lib/perl5/Text/Table.pm Installing /home/parv/test-perl5/man/man3/Text::Table.3

In reply to cpan client- install_base value not used to install Text::Table by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.