Your "http_proxy" setting inside the "/etc/yum.conf" file is only for when you are using "yum".
The CPAN or CPANM still not knowing those proxy settings yet.
The error you are seeing is because CPAN or CPANM were not able to first download the package then unpack it.
Here's an example of what you might see with if cpan or cpanm working correctly .... "Fetching", then "Unpacking":
Code: Select all
--> Working on Module::Metadata
Fetching http://www.cpan.org/authors/id/E/ET/ETHER/Module-Metadata-1.000022.tar.gz ... OK
Unpacking Module-Metadata-1.000022.tar.gz
https://blog.khmersite.net/2013/11/sett ... -for-cpan/
Code: Select all
To enable CPAN behind proxy:
# perl -MCPAN -e shell
Terminal does not support AddHistory.
cpan shell -- CPAN exploration and modules installation (v1.9402)
Enter 'h' for help.
cpan[1]> o conf init /proxy/
If you're accessing the net via proxies, you can specify them in the
CPAN configuration or via environment variables. The variable in
the $CPAN::Config takes precedence.
<ftp_proxy>
Your ftp_proxy? []
<http_proxy>
Your http_proxy? [webproxy.yourdomain.com:8080]
<no_proxy>
Your no_proxy? []
If your proxy is an authenticating proxy, you can store your username
permanently. If you do not want that, just press RETURN. You will then
be asked for your username in every future session.
Your proxy user id? []
Please remember to call 'o conf commit' to make the config permanent!
cpan[2]> o conf commit
commit: wrote '/usr/share/perl5/CPAN/Config.pm'
Code: Select all
yum install perl-Crypt-SSLeay -y
yum install -y libxml2-devel xml2 libuuid-devel perl-XML-LibXML perl-Env
export PERL_MM_USE_DEFAULT=1
cpan -i App::cpanminus
cpanm --notest Module::Build Crypt::SSLeay
cpan -i Nagios::Monitoring::Plugin Nagios::Monitoring::Plugin::Functions
https://assets.nagios.com/downloads/nag ... Server.pdf
Hope this helps!
Regards
Vinh