I am trying to install App::cpanminus Perl module using cpan App::cpanminus. I am getting the following errors. How can I fix the errors and install the module?
% cpan App::cpanminus
Reading '/Users/foo/.cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Fetching with HTTP::Tiny:
http://mirrors.ccs.neu.edu/CPAN/modules/02packages.details.txt.gz
HTTP::Tiny failed with an internal error: Could not connect to 'mirrors.ccs.neu.edu:80': nodename nor servname provided, or not known
Trying with
/usr/local/bin/wget -O "/Users/foo/.cpan/sources/modules/02packages.details.txt.gz.tmp73271"
to get
http://mirrors.ccs.neu.edu/CPAN/modules/02packages.details.txt.gz
--2021-11-02 11:31:07-- http://mirrors.ccs.neu.edu/CPAN/modules/02packages.details.txt.gz
Resolving mirrors.ccs.neu.edu (mirrors.ccs.neu.edu)... failed: nodename nor servname provided, or not known.
wget: unable to resolve host address 'mirrors.ccs.neu.edu'
...
Saving to: '/Users/foo/.cpan/sources/modules/02packages.details.txt.gz.tmp73271'
/Users/foo/.cpan/source [ <=> ] 43.63K --.-KB/s in 0.001s
2021-11-02 11:31:08 (34.3 MB/s) - '/Users/foo/.cpan/sources/modules/02packages.details.txt.gz.tmp73271' saved [44681]
Reading '/Users/foo/.cpan/sources/modules/02packages.details.txt.gz'
Warning: Your /Users/foo/.cpan/sources/modules/02packages.details.txt.gz does not contain a Line-Count header.
Please check the validity of the index file by comparing it to more
than one CPAN mirror. I'll continue but problems seem likely to
happen.
Warning: Your /Users/foo/.cpan/sources/modules/02packages.details.txt.gz does not contain a Last-Updated header.
Please check the validity of the index file by comparing it to more
than one CPAN mirror. I'll continue but problems seem likely to
happen.
Could not split line[""]
Could not split line[""]
.Could not split line[" !function(f,b,e,v,n,t,s)"]
Could not split line[" {if(f.fbq)return;n=f.fbq=function(){n.callMethod?"]
Giving up parsing your /Users/foo/.cpan/sources/modules/02packages.details.txt.gz, too many errors
Looks to me like there were attempt to download the file using multiple methods, and all of them failed, leaving you with no file or an empty file.
This points to a networking issue. You'll need to fix your network issues to continue. Perhaps you need to use a different mirror, or perhaps the downloaders need to be directed to use a proxy.
Note that you can delete the file, forcing another attempt to download it.
Update: I checked the validity of the URL your
cpanis configured to use (http://mirrors.ccs.neu.edu/CPAN), and it's bad. The namemirrors.ccs.neu.educan't be resolved. As such, you need to configurecpanto use a different mirror.To tell
cpanto use something else, runcpan. From within, use eithero conf init urllistoro conf urllist http://www.cpan.org/. Don't forget to save the setting usingo conf commitbefore exiting (quit).You could also use something like