dubis dubis - 5 months ago 35
Perl Question

CPAN install Device::USB Not OK

I'm on Debian 8 and I've got error when I Try to install Device::USB module with cpan

cpan Device::USB
Reading '/home/system/.cpan/Metadata'
Database was generated on Thu, 25 Aug 2016 14:29:02 GMT
Running install for module 'Device::USB'
Checksum for /home/system/.cpan/sources/authors/id/G/GW/GWADEJ/Device-USB-0.36.tar.gz ok
Configuring G/GW/GWADEJ/Device-USB-0.36.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Device::USB
Writing MYMETA.yml and MYMETA.json
Failed to find module path for 'dump_usb.pl' at Makefile.PL line 50.
Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site]
/usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK

I Checked the FAQ in the dump_usb.pl page in the cpan.org web site and I didn't find any relevant information about this snake biting its tail problem, as the cpan should install dump_usb.pl and its showing it didn't find the module

Thanks for any help


This is a known issue which has been reported to GitHub repo of Device::USB.

Possible solutions as per disucssion on that thread are:

  1. Downgrade Inline::MakeMaker

  2. Apply patch suggested by devsaurus


Make below change in Makefile.PL

+sub MY::libscan {
+   return if ($_[1] eq 'USB.pm' or $_[1] eq 'dump_usb.pl');
+   return $_[1];