Before you can use the CPAN shell on OpenBSD you need to install p5-LWP-UserAgent-Determined from the ports tree/packages.
Otherwise you wont be able to fetch any components properly
eg:
Fetching with Net::FTP:
ftp://cpan.sunsite.ualberta.ca/pub/CPAN/authors/01mailrc.txt.gz
Couldn’t fetch 01mailrc.txt.gz from cpan.sunsite.ualberta.ca
Trying with “/usr/bin/lynx -source” to get ftp://CPAN.mirror.rafal.ca/pub/CPAN/authors/01mailrc.txt.gz
gzip: /root/.cpan/sources/authors/01mailrc.txt: unknown suffix: ignored
& the process will bomb out with MD5 checksum errors eg:
Trying with “/usr/bin/lynx -source” to get
ftp://CPAN.mirror.rafal.ca/pub/CPAN/authors/id/A/AN/ANDK/Bundle-CPAN-1.853.tar.gz
gzip: /root/.cpan/sources/authors/id/A/AN/ANDK/Bundle-CPAN-1.853.tar: unknown suffix: ignored
CPAN: Digest::MD5 loaded ok
Trying with “/usr/bin/lynx -source” to get
ftp://CPAN.mirror.rafal.ca/pub/CPAN/authors/id/A/AN/ANDK/CHECKSUMS
Checksum mismatch for distribution file. Please investigate.
Distribution id = A/AN/ANDK/Bundle-CPAN-1.853.tar.gz
CPAN_USERID ANDK (Andreas J. Koenig )
CONTAINSMODS
MD5_STATUS
localfile /root/.cpan/sources/authors/id/A/AN/ANDK/Bundle-CPAN-1.853.tar.gz
I’d recommend removing
/root/.cpan/sources/authors/id/A/AN/ANDK/Bundle-CPAN-1.853.tar.gz. Its MD5
checksum is incorrect. Maybe you have configured your ‘urllist’ with
a bad URL. Please check this array with ‘o conf urllist’, and retry.
Alternatively, you can temporarily disable lynx. This will cause cpan to use FTP (you may need to force passive mode if you firewall does not permit active mode):
# export FTP_PASSIVE=yes
# cpan
cpan> o conf lynx ”
cpan> install Bundle::LWP
cpan> install Bundle::CPAN