davidov0009 has asked for the wisdom of the Perl Monks concerning the following question:

I am having terrible luck with using perl -MCPAN -e shell to download modules from CPAN. They go through all the dependencies and then it just fails in the end and dies. I have gotten numerous errors. Now when I start up MCPAN it prompts for for stuff I am not quite sure of:
Sorry, we have to rerun the configuration dialog for CPAN.pm due to the following indispensable but missing parameters: mbuild_arg, mbuild_install_arg, mbuild_install_build_command, mbuildpl +_arg The next questions deal with Module::Build support. A Build.PL is run by perl in a separate process. Likewise we run './Build' and './Build install' in separate processes. If you have any parameters you want to pass to the calls, please specify them here. Parameters for the 'perl Build.PL' command? Typical frequently used settings: --install_base /home/xxx # different installation dire +ctory Your choice: [] Parameters for the './Build' command? Setting might be: --extra_linker_flags -L/usr/foo/lib # non-standard library locati +on Your choice: [] Do you want to use a different command for './Build install'? Sudo users will probably prefer: su root -c ./Build or sudo ./Build or /path1/to/sudo -u admin_account ./Build or some such. Your choice: [./Build] Parameters for the './Build install' command? Typical frequently used setting: --uninst 1 # uninstall conflicting files Your choice: [] Please remember to call 'o conf commit' to make the config permanent! cpan shell -- CPAN exploration and modules installation (v1.8801) ReadLine support enabled
That happened after I ran install Bundle::CPAN. The problems are also occuring when I am making the modules I have downloaded, it just gets bad test results and won't continue.

Replies are listed 'Best First'.
Re: MCPAN shell not working.
by rinceWind (Monsignor) on Sep 24, 2006 at 17:46 UTC

    For most of the questions you have listed, it's perfectly safe to take the defaults. For the question about ./Build install (and the corresponding one about make install), you should use a sudo command if you intend to run CPAN shell as yourself, not as root.

    The problems are also occuring when I am making the modules I have downloaded, it just gets bad test results and won't continue.

    Bad test results can be due to a number of causes. Please supply more details if you want us to help.

    --

    Oh Lord, won’t you burn me a Knoppix CD ?
    My friends all rate Windows, I must disagree.
    Your powers of persuasion will set them all free,
    So oh Lord, won’t you burn me a Knoppix CD ?
    (Missquoting Janis Joplin)

Re: MCPAN shell not working.
by Khen1950fx (Canon) on Sep 24, 2006 at 19:13 UTC
    Hi. You have CPAN installed, and it is working with ReadLine enabled. What's happening is normal first-time configuration. As rinceWind mentioned, just accept the defaults by hitting "enter". At the next prompt, type in "o conf". This will show you your current configuration. If it's ok, type in "o conf commit". That will save the config to Config.pm.

    As for failing tests, you probably have some unsatisfied dependencies. For example, to get the modules to pass the tests, there are some modules that you really need: Test::Pod, Test::Pod::Coverage, GnuPG, and Test::Signature. At a minimum, you need Test::Pod, Test::Pod::Coverage. You might have to download the tarballs and install them manually.

    Update: I was thinking in terms of batch mode---the CPAN shell itself. Just type in "cpan" at the prompt. When the shell prompt comes up enter "?" for help...

      I am attempting to install those above modules manually, that seems to have worked. But I still get random errors. I am now trying to install Test-Simple 0.64 which is required for WWW:Mechanize and seems to be causing CPAN problems. I get an error telling me to make sure my pod2man program is in the PATH. Here is the output, and proof that pod2man is in my path...any ideas on how to tell?
      Warning: I could not locate your pod2man program. Please make sure, your pod2man program is in your PATH before you execute 'make +' Writing Makefile for Test::Simple [root@localhost Test-Simple-0.64]# slocate pod2man /usr/bin/pod2man /usr/share/man/man1/pod2man.1.gz [root@localhost Test-Simple-0.64]# echo $PATH /usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/kimball/bin
        Hi. What's happening here is Test::Simple is looking for pod2man. That's ok. You have pod2man on your system, but that's not the pod2man that we need. You need the pod2man Perl module. It's part of the podlators module.

        Here's where it gets tricky. For some reason which I can't figure out, the CPAN shell can't find podlators, so you'll need to download it manually from CPAN and install it yourself. After installation, pod2man becomes Pod::Man. Run "perldoc Pod::Man" to get more info.