http://www.perlmonks.org?node_id=1153785


in reply to OSX Server Perl install modules

You need to run that under sudo. Also, you might want to consider using perlbrew which will allow you to install modules as a non-privileged user. From the shell:

$ sudo cpan

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re^2: OSX Server Perl install modules
by perldb2 (Initiate) on Jan 27, 2016 at 20:00 UTC
    Well sudo does not work either
    cpan[2]> sudo install Finance::YahooQuote + + Unknown shell command 'sudo'. Type ? for help.
      You need to use sudo for the CPAN shell:
      sudo perl -MCPAN -e shell ... cpan> install Finance::YahooQuote
        sudo in the shell worked! My silly mistake