I am wondering why I get "Installing the dependencies failed: Module 'Module::Name' is not installed" even when dependency is has been installed. I am using perlbrew and cpanm. Here is an example of what happens with many modules that I try to install:
I try to install for example URI::ws as follow
hamid#caspian:~$ /home/hamid/perl5/perlbrew/bin/cpanm --installdeps URI::ws
--> Working on URI::ws
Fetching http://www.cpan.org/authors/id/P/PL/PLICEASE/URI-ws-0.03.tar.gz ... OK
Configuring URI-ws-0.03 ... OK
==> Found dependencies: URI
--> Working on URI
Fetching http://www.cpan.org/authors/id/E/ET/ETHER/URI-1.67.tar.gz ... OK
Configuring URI-1.67 ... OK
Building and testing URI-1.67 ... OK
Successfully installed URI-1.67
! Installing the dependencies failed: Module 'URI' is not installed
! Bailing out the installation for URI-ws-0.03.
1 distribution installed
it tells me URI is not installed. So I install URI as follow:
hamid#caspian:~$ /home/hamid/perl5/perlbrew/bin/cpanm URI
--> Working on URI
Fetching http://www.cpan.org/authors/id/E/ET/ETHER/URI-1.67.tar.gz ... OK
Configuring URI-1.67 ... OK
Building and testing URI-1.67 ... OK
Successfully installed URI-1.67
1 distribution installed
I go back to what I originally wanted which was URI::ws and here is what I get:
hamid#caspian:~$ /home/hamid/perl5/perlbrew/bin/cpanm URI::ws
--> Working on URI::ws
Fetching http://www.cpan.org/authors/id/P/PL/PLICEASE/URI-ws-0.03.tar.gz ... OK
Configuring URI-ws-0.03 ... OK
==> Found dependencies: URI
--> Working on URI
Fetching http://www.cpan.org/authors/id/E/ET/ETHER/URI-1.67.tar.gz ... OK
Configuring URI-1.67 ... OK
Building and testing URI-1.67 ... OK
Successfully installed URI-1.67
! Installing the dependencies failed: Module 'URI' is not installed
! Bailing out the installation for URI-ws-0.03.
1 distribution installed
Can anyone tell me why this is happening and what I can do to stop it? If there is any more information that you need which I have missed please let me know.
Thank you
Thanks to https://stackoverflow.com/users/2019415/g-cito
hamid#caspian:~$ PERL_MM_OPT=""; PERL_MB_OPT="";
has done the job :)
local::lib was messing stuff up. URI.pm was installed but not under the perlbrew directory.
With perlbrew you can install a perlbrew specific cpanm which facilitates installing to the various perls/ that are installed/managed using the perlbrew tool. I have found that this works very well.
However perlbrew can become confused if you mix in your own local::lib and set related environment variables like PERL5LIB, PERL_MM_OPT, PERL_MB_OPT etc. (see for example the post by #cjm in perlbrew and local::lib at the same time?). Some of these environment vars can interact and interfere with perlbrew's own environment so it's generally best to avoid mixing them or simply to let perlbrew manage the environment using its own versions of those variables.
It is of course possible to use local::lib environments "inside" perlbrew with the lib command) and to do very complicated things for testing with different perl versions, shipping an application with requirements (c.f. Carton). In my own environment I was able to manage system perl; a user installed local::lib that used the system perl; and a huge set of perlbrew perls all with judicious use of environment variables (thankfully a temporary set up while migrating between versions).
That sort of set up can get complicated very quickly, and is difficult to replicate. One of the greatest advantages of perlbrew is you can easily setup matching perl environments on multiple machines; or different perl environments on the same machine.
Related
I am trying to install Net::SSH::Perl using cpanm (from perlbrew and perl version 5.30). The installation fails with:
$ cpanm Net::SSH::Perl
--> Working on Net::SSH::Perl
Fetching http://www.cpan.org/authors/id/S/SC/SCHWIGON/Net-SSH-Perl-2.14.tar.gz ... OK
Configuring Net-SSH-Perl-2.14 ... OK
==> Found dependencies: Crypt::Curve25519
--> Working on Crypt::Curve25519
Fetching http://www.cpan.org/authors/id/A/AJ/AJGB/Crypt-Curve25519-0.06.tar.gz ... OK
Configuring Crypt-Curve25519-0.06 ... OK
Building and testing Crypt-Curve25519-0.06 ... FAIL
! Installing Crypt::Curve25519 failed. See /home/hakon/.cpanm/work/1587758019.381709/build.log for details. Retry with --force to force install it.
! Installing the dependencies failed: Missing version info for module 'Crypt::Curve25519'
! Bailing out the installation for Net-SSH-Perl-2.14.
The problem with installing Crypt::Curve25519 is described in this issue. I downloaded the problematic module Crypt::Curve25519 and patched it:
git clone git#github.com:ajgb/crypt-curve25519.git
wget https://www.cpan.org/authors/id/S/SR/SREZIC/patches/Crypt-Curve25519-0.06-PR10-ANOTHERLINK.patch
cd crypt-curve25519
git apply ../Crypt-Curve25519-0.06-PR10-ANOTHERLINK.patch
perl Makefile.PL
make # No errors now
make test
make install
However, when I try again to install Crypt::Curve25519 it still tries to install the broken module from CPAN:
$ cpanm Net::SSH::Perl
--> Working on Net::SSH::Perl
Fetching http://www.cpan.org/authors/id/S/SC/SCHWIGON/Net-SSH-Perl-2.14.tar.gz ... OK
Configuring Net-SSH-Perl-2.14 ... OK
==> Found dependencies: Crypt::Curve25519
--> Working on Crypt::Curve25519
Fetching http://www.cpan.org/authors/id/A/AJ/AJGB/Crypt-Curve25519-0.06.tar.gz ... OK
Configuring Crypt-Curve25519-0.06 ... OK
Building and testing Crypt-Curve25519-0.06 ... FAIL
! Installing Crypt::Curve25519 failed. See /home/hakon/.cpanm/work/1587758833.382749/build.log for details. Retry with --force to force install it.
! Installing the dependencies failed: Missing version info for module 'Crypt::Curve25519'
! Bailing out the installation for Net-SSH-Perl-2.14.
How can I make cpanm use the installed patch instead (i.e. skip installation of Crypt::Curve25519 since it is already installed)?
The problem seems to be missing VERSION information in the module. By adding a line
our $VERSION = 0.06;
to the top of the file lib/Crypt/Curve25519.pm and then reinstall, and then installing cpanm Net::SSH::Perl worked fine (it accepted the patched installation and did not try to download the broken version).
Here is the patch I used to lib/Crypt/Curve25519.pm:
diff --git a/lib/Crypt/Curve25519.pm b/lib/Crypt/Curve25519.pm
index 686b706..d9c2b3d 100644
--- a/lib/Crypt/Curve25519.pm
+++ b/lib/Crypt/Curve25519.pm
## -1,4 +1,5 ##
package Crypt::Curve25519;
+our $VERSION = 0.06;
#ABSTRACT: Generate shared secret using elliptic-curve Diffie-Hellman function
use strict;
There's a few things to check:
cpanm knows where to find your patched version.
The patched version has a version that's higher than the one on CPAN. The module idea in CPAN assumes that you always want the latest, so ensure that yours is.
You don't want to install a patched module at the standard location because you don't want a cpan client to overwrite it.
Some other things that can work:
Force install the module and ignore the failures (cpanm has a --notest feature). The CPAN version is still installed, but that doesn't matter.
Have your patched version in a separate directory that's at the front of #INC so your program finds it first. This effectively hides the CPAN version.
I am using conda to install several packages. I already installed Perl under conda and is the one working in this machine (running Ubuntu 18.04). Now I am trying to use a script that requires bioperl.
I tried to update conda, install bioperl through conda AND installing bioperl through cpanm as shown below.
I checked to currently used Perl is the anaconda one. The shebang in the perl script is #!/home/evo-slave/anaconda_ete/bin/perl -w
This is the initial error while running the script
Can't locate Bio/SeqIO.pm in #INC (you may need to install the
Bio::SeqIO module) (#INC contains: /home/evo-
slave/anaconda_ete/lib/site_perl/5.26.2/x86_64-linux-thread-multi
/home/evo-slave/anaconda_ete/lib/site_perl/5.26.2 /home/evo-
slave/anaconda_ete/lib/5.26.2/x86_64-linux-thread-multi /home/evo-
slave/anaconda_ete/lib/5.26.2 .) at ./cortador.pl line 9.
BEGIN failed--compilation aborted at ./cortador.pl line 9.
I don`t know if this is an issue of bioperl not being called/installed by the anaconda perl or during the execution of the script, maybe this lines within the script should indicate something else
use File::Basename;
use Bio::SeqIO;
use Bio::Seq;
use Bio::DB::SeqFeature::Store;
use Bio::SeqFeatureI;
When I try to install
cpanm Bio::Perl
I got this error
--> Working on Bio::Perl
Fetching http://www.cpan.org/authors/id/C/CJ/CJFIELDS/BioPerl-
1.007002.tar.gz ... OK
Configuring BioPerl-1.007002 ... OK
==> Found dependencies: IO::String, Data::Stag, Test::Most
--> Working on IO::String
Fetching http://www.cpan.org/authors/id/G/GA/GAAS/IO-String-
1.08.tar.gz ... OK
Configuring IO-String-1.08 ... OK
Building and testing IO-String-1.08 ... OK
Successfully installed IO-String-1.08
--> Working on Data::Stag
Fetching http://www.cpan.org/authors/id/C/CM/CMUNGALL/Data-Stag-
0.14.tar.gz ... OK
Configuring Data-Stag-0.14 ... OK
==> Found dependencies: IO::String
! Installing the dependencies failed: Module 'IO::String' is not
installed
! Bailing out the installation for Data-Stag-0.14.
--> Working on Test::Most
Fetching http://www.cpan.org/authors/id/O/OV/OVID/Test-Most-
0.35.tar.gz ... OK
Configuring Test-Most-0.35 ... OK
==> Found dependencies: Test::Warn, Test::Deep, Test::Differences,
Test::Exception, Exception::Class
--> Working on Test::Warn
Fetching http://www.cpan.org/authors/id/B/BI/BIGJ/Test-Warn-
0.36.tar.gz ... OK
Configuring Test-Warn-0.36 ... OK
==> Found dependencies: Sub::Uplevel
--> Working on Sub::Uplevel
Fetching http://www.cpan.org/authors/id/D/DA/DAGOLDEN/Sub-Uplevel-
0.2800.tar.gz ... OK
Configuring Sub-Uplevel-0.2800 ... OK
Building and testing Sub-Uplevel-0.2800 ... OK
Successfully installed Sub-Uplevel-0.2800
! Installing the dependencies failed: Module 'Sub::Uplevel' is not
installed
! Bailing out the installation for Test-Warn-0.36.
--> Working on Test::Deep
Fetching http://www.cpan.org/authors/id/R/RJ/RJBS/Test-Deep-
1.128.tar.gz ... OK
Configuring Test-Deep-1.128 ... OK
Building and testing Test-Deep-1.128 ... OK
Successfully installed Test-Deep-1.128
--> Working on Test::Differences
Fetching http://www.cpan.org/authors/id/D/DC/DCANTRELL/Test-
Differences-0.67.tar.gz ... OK
Configuring Test-Differences-0.67 ... OK
==> Found dependencies: Capture::Tiny, Text::Diff
--> Working on Capture::Tiny
Fetching http://www.cpan.org/authors/id/D/DA/DAGOLDEN/Capture-
Tiny-0.48.tar.gz ... OK
Configuring Capture-Tiny-0.48 ... OK
Building and testing Capture-Tiny-0.48 ... OK
Successfully installed Capture-Tiny-0.48
--> Working on Text::Diff
Fetching http://www.cpan.org/authors/id/N/NE/NEILB/Text-Diff-
1.45.tar.gz ... OK
Configuring Text-Diff-1.45 ... OK
==> Found dependencies: Algorithm::Diff
--> Working on Algorithm::Diff
Fetching http://www.cpan.org/authors/id/T/TY/TYEMQ/Algorithm-Diff-
1.1903.tar.gz ... OK
Configuring Algorithm-Diff-1.1903 ... OK
Building and testing Algorithm-Diff-1.1903 ... OK
Successfully installed Algorithm-Diff-1.1903
! Installing the dependencies failed: Module 'Algorithm::Diff' is
not installed
! Bailing out the installation for Text-Diff-1.45.
! Installing the dependencies failed: Module 'Text::Diff' is not
installed, Module 'Capture::Tiny' is not installed
! Bailing out the installation for Test-Differences-0.67.
--> Working on Test::Exception
Fetching http://www.cpan.org/authors/id/E/EX/EXODIST/Test-
Exception-0.43.tar.gz ... OK
Configuring Test-Exception-0.43 ... OK
==> Found dependencies: Sub::Uplevel
! Installing the dependencies failed: Module 'Sub::Uplevel' is not
installed
! Bailing out the installation for Test-Exception-0.43.
--> Working on Exception::Class
Fetching http://www.cpan.org/authors/id/D/DR/DROLSKY/Exception-
Class-1.44.tar.gz ... OK
Configuring Exception-Class-1.44 ... OK
==> Found dependencies: Class::Data::Inheritable
--> Working on Class::Data::Inheritable
Fetching http://www.cpan.org/authors/id/T/TM/TMTM/Class-Data-
Inheritable-0.08.tar.gz ... OK
Configuring Class-Data-Inheritable-0.08 ... OK
Building and testing Class-Data-Inheritable-0.08 ... OK
Successfully installed Class-Data-Inheritable-0.08
! Installing the dependencies failed: Module
'Class::Data::Inheritable' is not installed
! Bailing out the installation for Exception-Class-1.44.
! Installing the dependencies failed: Module 'Test::Exception' is
not installed, Module 'Test::Differences' is not installed, Module
'Exception::Class' is not installed, Module 'Test::Warn' is not
installed, Module 'Test::Deep' is not installed
! Bailing out the installation for Test-Most-0.35.
! Installing the dependencies failed: Module 'Test::Most' is not
installed, Module 'IO::String' is not installed, Module
'Data::Stag'
is not installed
! Bailing out the installation for BioPerl-1.007002.
6 distributions installed
ETA: It seems something is wrong and the dependencies of the modules that are required are not installed during a simple cpanm
Example of a round trying to install everything that is needed
cpanm Sub::Uplevel
--> Working on Sub::Uplevel
Fetching http://www.cpan.org/authors/id/D/DA/DAGOLDEN/Sub-Uplevel-0.2800.tar.gz ... OK
Configuring Sub-Uplevel-0.2800 ... OK
Building and testing Sub-Uplevel-0.2800 ... OK
Successfully installed Sub-Uplevel-0.2800
1 distribution installed
then
cpanm Test::Warn
--> Working on Test::Warn
Fetching http://www.cpan.org/authors/id/B/BI/BIGJ/Test-Warn-0.36.tar.gz ... OK
Configuring Test-Warn-0.36 ... OK
==> Found dependencies: Sub::Uplevel
--> Working on Sub::Uplevel
Fetching http://www.cpan.org/authors/id/D/DA/DAGOLDEN/Sub-Uplevel-0.2800.tar.gz ... OK
Configuring Sub-Uplevel-0.2800 ... OK
Building and testing Sub-Uplevel-0.2800 ... OK
Successfully installed Sub-Uplevel-0.2800
! Installing the dependencies failed: Module 'Sub::Uplevel' is not installed
! Bailing out the installation for Test-Warn-0.36.
1 distribution installed
Some info to help debugging:
$ set | grep ^PERL
PERL5LIB=:/media/evo-slave/Disco2/ANDRES/DOWNLOADS/GENOME/CAV-POC/GAAS/annotation
PERL_MB_OPT='--install_base "/home/evo-slave/perl5"'
PERL_MM_OPT=INSTALL_BASE=/home/evo-slave/perl5
$ which cpanm
/home/evo-slave/anaconda_ete/bin/cpanm
$ head -n 1 "$( which cpanm )"
#!/home/evo-slave/anaconda_ete/bin/perl
UPDATE 2
This problem is coming up again in miniconda3 bioperl installs.
UPDATE
I have not experienced this error for a while with perl packages, so likely some updates occurred on the conda/package side that fixed this. I would recommend trying to update your conda and checking your conda channels before trying this kind of weird kludge.
ORIGINAL ANSWER
I am posting this as an answer not because it's a good idea, but because it provides more information. I am working on Amazon Linux so it's slightly different, but also running into issues with bioperl dependencies installed through conda. In my case I am trying to run VirSorter, which mentions this problem and proposes a solution that does not work for me, but suggests confirming that your PERL5LIB is properly set.
I observed that my perl is 5.26.2:
$ perl --version
This is perl 5, version 26, subversion 2 (v5.26.2) built for x86_64-linux-thread-multi
But conda is for some obscure reason installing my perl dependencies for 5.22.0: /home/ec2-user/anaconda3/envs/virsorter/lib/perl5/site_perl/5.22.0/:
$ ls /home/ec2-user/anaconda3/envs/virsorter/lib/perl5/site_perl/5.22.0/
Algorithm Bio Capture Class Data Devel Exception IO Sub Test Text URI URI.pm x86_64-linux-thread-multi
I found that I could get VirSorter running, apparently successfully, by simply setting PERL5LIB to the 5.22.0 lib under conda:
OLD_PER5LIB=$PERL5LIB
export PERL5LIB=/home/ec2-user/anaconda3/envs/virsorter/lib/perl5/site_perl/5.22.0/
# run virsorter
# no errors!
I am sure that this throws up a bunch of red flags for the perl people, and I'm sure that it's very fragile if it actually works at all. Perhaps the question is why conda is installing perl modules as the wrong perl version?
I am trying to install Crypt::Random module, a cryptographically secure random number generator, and says it requires Math::Pari 2.001802, which is not availible from cpan.org, but says it is available from this other URL, which does not work. I tried to install them both anyway and encountered this problem:
C:\Users\Jlinne\Documents> cpanm Crypt::Random
--> Working on Crypt::Random
Fetching http://www.cpan.org/authors/id/V/VI/VIPUL/Crypt-Random-1.25.tar.gz ... OK
Configuring Crypt-Random-1.25 ... OK
==> Found dependencies: Math::Pari
--> Working on Math::Pari
Fetching http://www.cpan.org/authors/id/I/IL/ILYAZ/modules/Math-Pari-2.01080900.zip ... OK
Configuring Math-Pari-2.01080900 ... N/A
! Configure failed for Math-Pari-2.01080900. See C:\Users\Jlinne\.cpanm\work\1476250290.12460\build.log for details.
! Installing the dependencies failed: Module 'Math::Pari' is not installed
! Bailing out the installation for Crypt-Random-1.25.
C:\Users\Jlinne\Documents> cpanm Math::Pari
--> Working on Math::Pari
Fetching http://www.cpan.org/authors/id/I/IL/ILYAZ/modules/Math-Pari-2.01080900.zip ... OK
Configuring Math-Pari-2.01080900 ... N/A
! Configure failed for Math-Pari-2.01080900. See C:\Users\Jlinne\.cpanm\work\1476250325.1340\build.log for details.
The build.log does not help me either, any other possible ways to install this module successfully? Thanks.
You will have to share the build.log file. Without that we cannot check what caused the failure.
BTW for Math::Pari you need PARI library. Starting from version 2.0, this module comes without a PARI library included.
Since you are trying to install Math-Pari-2.01080900, therefore you will first have to install PARI library.
Get it from http://pari.math.u-bordeaux.fr/download.html
If you're ok with using 32 bit Perl, you could use 32 bit Strawberry Perl, which already has both Math::Pari and Crypt::Random modules installed.
Unfortunately the 64 bit versions of Strawberry Perl do not include either of these modules. In that case, you'll have to follow the suggestion from Chankey Pathak about installing the PARI library in order to install the Math::Pari module.
I'm trying to install Math::Pari module but getting error.
I'm installing on Windows Server 2012R2, I've Strawberry perl v5.18.4.1 32-bit currently installed on it.
Actually Math::Pari is dependency for Net::SSH::W32Perl and I want to install that module.
Following is the error log. Please Give me step by step installation procedure.
cpanm (App::cpanminus) 1.7039 on perl 5.018004 built for MSWin32-x64-multi-thread
Work directory is C:\Users\script/.cpanm/work/1438929213.2276
You have make C:\strawberry\c\bin\dmake.exe
You have LWP 6.08
Falling back to Archive::Tar 2.02
Searching Math::Pari () on cpanmetadb ...
--> Working on Math::Pari
Fetching http://www.cpan.org/authors/id/I/IL/ILYAZ/modules/Math-Pari-2.010808.zip
-> OK
Unpacking Math-Pari-2.010808.zip
Entering Math-Pari-2.010808/
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (6.98)
Configuring Math-Pari-2.010808
Running Makefile.PL
Did not find GP/PARI build directory around.
Apparently, you are running a 64-bit Perl built with MicroSoft's compilers.
GP/PARI (at least the versions I know how to work with, 2.1.* and 2.3.*)
cannot be built in this environment. I won't auto-download GP/PARI.
If you believe that this message is printed erroneously, please report
(see files README and INSTALL), and put force_download on the command line:
perl Makefile.PL force_download
One can rerun Makefile.PL after fetching GP/PARI archive (e.g., pari-2.1.7.tgz,
or pari-2.3.4.tar.gz) manually to the current directory, or a (grand)parent
directory of the current directory.
[Keep in mind that the numbers "inside version" of Math::Pari module
correspond to the last versions of GP/PARI it was tested with (additionally,
2.0108* works best with the last 2.1.* version, 2.1.7).
As an alternative to having archive in CWD or its (grand)parent, specify
pari_tgz=PATH_TO_TAR_GZ
option to Makefile.PL.
There is no need to extract the archive, or build GP/PARI; but if you
have it extracted [and patched, if needed], you may specify
paridir=PATH_TO_DIST_DIR
option to Makefile.PL instead of `pari_tgz'. However, in this case
the files WON'T be auto-patched.
As a last-resort solution, there is also a possibility to use an already
compiled PARI library. See the documentation in README and INSTALL files.]
Could not find GP/PARI build directory, please run Makefile.PL
with paridir=/directory option.
-> N/A
-> FAIL Configure failed for Math-Pari-2.010808. See C:\Users\script\.cpanm\work\1438929213.2276\build.log for details.
I thought I'd add a note for anyone coming here as a result of a Google search after their own Math::Pari install fails under Strawberry Perl.
Here is what worked for me (Strawberry 5.22):
A. from the cpan shell, tried to install Math::Pari. this failed
B. Downloaded pari-2.1.7 and placed the extracted folder pari-2.1.7 in the cpan build folder that was created in (0). This is found, by default, in C:\Strawberry\cpan\build
C.perl Makefile.PL Configure machine=none
D. dmake
E. dmake install
It basically means that 64 bit versions of perl are not supported. It also means that if you're sure that you're running a 32 bit version incorrectly detected as 64 bit, you can try opening a command line and then doing
cd C:\Users\script\.cpanm\work\1438929213.2276\
perl Makefile.PL force_download
I am following the below procedure for installing LDAP in unix
1.tar -xzf perl-ldap-0.43.tar.gz
2.cd perl-ldap-0.43
3.perl MakeFile.PL
I am getting below message
* Checking for Perl dependencies...
We have to reconfigure CPAN.pm due to following uninitialized parameters:
cpan_home, keep_source_where, build_dir, build_cache, scan_cache, index_expire, gzip, tar, unzip, make, pager, makepl_arg, make_arg, make_install_arg, urllist, inhibit_startup_message, ftp_proxy, http_proxy, no_proxy, prerequisites_policy, cache_metadata
CPAN is the world-wide archive of perl resources. It consists of about
100 sites that all replicate the same contents all around the globe.
Many countries have at least one CPAN site already. The resources
found on CPAN are easily accessible with the CPAN.pm module. If you
want to use CPAN.pm, you have to configure it properly.
If you do not want to enter a dialog now, you can answer 'no' to this
question and I'll try to autoconfigure. (Note: you can revisit this
dialog anytime later by typing 'o conf init' at the cpan prompt.)
Are you ready for manual configuration? [yes]
How to install without CPAN and what are the dependent modules required to install Ldap?
Can anyone suggest me the standard process of installation.
Thanks In Advance
I assume that by perl-ldap-0.43.tar.gz you are trying to install Net::LDAP
How to install without CPAN?
CPAN is the recommended way of installing Perl modules. You have to configure it just once, after that if you need to install any Perl module you can just type the below.
$ cpan ModuleName like in your case instead of downloading, untaring and running makefile you can just do:
$ cpan Net::LDAP
What are the dependent modules required to install Ldap?
One more advantage of using CPAN is you don't have to care about dependencies. CPAN will install dependencies automatically if you ask it to do so. Do it by
$ perl -MCPAN -e shell
cpan[1]> o conf prerequisites_policy follow
cpan[2]> o conf commit
exit
Or just use App::cpanminus and run
$ cpanm Net::LDAP it will install the module with all its dependencies.
Also check out Perl LDAP page.
Edit: Based on your answer
You will get some errors like above, you will have to see the error log, check the Module which is missing, then go to CPAN and download that module's tar.gz and then do the same steps as you were doing, like untaring, and running Makefile. You will have to do this unless all of your dependencies are installed.
Can we ignore warnings while installing perl modules?
I have installed ExtUtils-MakeMaker-6.98.tar.gz by ignoring below warnings
Using included version of ExtUtils::Install (1.54) as it is newer than the installed version (1.33).
Using included version of CPAN::Meta::YAML (0.008) because it is not already installed.
Using included version of JSON::PP::Compat5006 (1.09) because it is not already installed.
Using included version of ExtUtils::Manifest (1.60) as it is newer than the installed version (1.46).
Using included version of version (0.88) because it is not already installed.
Using included version of ExtUtils::Command (1.16) as it is newer than the installed version (1.09).
Using included version of CPAN::Meta (2.120351) because it is not already installed.
Using included version of JSON::PP (2.27203) because it is not already installed.
Using included version of File::Temp (0.22) as it is newer than the installed version (0.16).
Using included version of Parse::CPAN::Meta (1.4405) because it is not already installed.
Using included version of File::Copy::Recursive (0.38) because it is not already installed.
Checking if your kit is complete...
Warning: the following files are missing in your kit:
't/liblist/win32/di
't/liblist/win32/space
Please inform the author.
Generating a Unix-style Makefile
Writing Makefile for ExtUtils::MakeMaker
Writing MYMETA.yml and MYMETA.json**
But I'm able to install successfully. Will it create any problems in future?