Using the CPAN shell / Installing Bundle::CPAN on OpenBSD

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 <andreas .koenig@anima.de%gt;)
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.

3 Replies to “Using the CPAN shell / Installing Bundle::CPAN on OpenBSD”

  1. 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

  2. Thank you very much for this explanation — it was of great help

  3. Thanks. I had a similar behaviour, but with renaming the downloaded files:

    Error while trying to rename ‘/root/.cpan/sources/modules/02packages.details.txt.gz.tmp23219’ to ‘/root/.cpan/sources/modules/02packages.details.txt.gz’: No such file or directory

    installing p5-LWP-UserAgent-Determined-1.03 solved that.

Comments are closed.