I’m new to Perl and am trying to install the Net::SFTP module by running
cpanm Net::SFTP
I tried the install and after 5-10 minutes it failed with the following
! Configure failed for Math-GMP-2.06. See /Users/applemacbookpro/.cpanm/build.log for details.
! Bailing out the installation for Net-SSH-Perl-1.34. Retry with --prompt or --force.
! Bailing out the installation for Net-SFTP-0.10. Retry with --prompt or --force.
19 distributions installed
But, when I tried the install again, I noticed this message:
Can't write to /opt/local/lib/perl5/site_perl/5.12.3 and /opt/local/bin: Installing modules to /Users/applemacbookpro/perl5
So, now I have a bunch of modules installed in the ~/perl5 directory – am I going to run into problems if I then install using sudo and my perl modules are located in two separate directories?
Perl searches for modules based on @INC, which you can see with
perl -V. (That’s an uppercase “V”.) If you have the module installed in two locations, the first one found in @INC will be the one loaded.Perl wouldn’t normally know to even look in
/Users/applemacbookpro/perl5, so chances are it won’t find the modules there.If you didn’t have any modules in
/Users/applemacbookpro/perl5to begin with, feel free to delete the directory.