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

I have been working in Ubuntu 16.08 and I have been trying to install an R based program, which uses Perl, when I do perl INSTALL.pl, it gives me the following:  cpanm not found in /home/avt2130/ViewBS-0.1.7. Please check.

I tried to put in .profile the path:  export PATH=$PATH:/usr/bin/perl but it did not help

Please help me with this issue

Replies are listed 'Best First'.
Re: Problems with cpanm
by marto (Cardinal) on Mar 14, 2019 at 21:17 UTC

    There's a bug in their release:

    marto@Shemp:~/code/what/ViewBS-0.1.7$ ls conda doc INSTALL license.txt test.py cpanm environment.yaml INSTALL.pl README.md ViewBS data image lib Rplots.pdf ViewBSdocker

    And their INSTALL.pl looks for cpanm in:

    ## Check cpanm my $dir = dirname(abs_path $0); my $CPANM = "$dir/ext_tools/cpanm";

    Note the extra ext_tools directory. So when you run INSTALL.pl as directed by the docs, you get the error:

    marto@Shemp:~/code/what/ViewBS-0.1.7$ perl INSTALL.pl PASSED: Perl version(5.026001 >= 5.14.4). Error: cpanm not found in /home/marto/code/what/ViewBS-0.1.7. Please c +heck.

    A quick fix would be to create a directory called ext_tools, and move cpanm in there, then continue the process:

    marto@Shemp:~/code/what/ViewBS-0.1.7$ mkdir ext_tools marto@Shemp:~/code/what/ViewBS-0.1.7$ mv cpanm ext_tools/ marto@Shemp:~/code/what/ViewBS-0.1.7$ perl INSTALL.pl

    The previous release had this directory, and cpanm was the only thing in it. I've raised the issue over at the github repo.

    Update: Well, the owner fixed the issue very quickly. The system works :)

      Thank you so much! But now I am getting this issue Installation of Perl module Getopt::Long::Subcommand failed. Please install manually How can do it manually?

        No problem, let me know if you have any other problems with this.

      Should I leave  cpanm in the directory  ext_tools? Should I copy back to Perl directory?

        Sorry, I've not been around for a few days. I raised a pr to fix a couple of things. Are you still experiencing issues?

        Update: Merged. It fixes the cpanm permissions and a problem with the INSTALL.pl, reuse of a variable used to check installation status.