Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
hi guys. after some trouble, i ve managed to install through cpan the Device::USB module. However, i ve come up with a problem that google couldnt help me with. My code is this:
#!/usr/bin/perl use warnings; use diagnostics; use Device::USB; $usb = Device::USB->new(); print "1\n";
and the outcome is this:
Segmentation fault (core dumped)
my perl -d:Trace give me this:
>> (eval 7)[/usr/local/share/perl5/Inline.pm:199]:4: $INIT++; >> (eval 7)[/usr/local/share/perl5/Inline.pm:199]:5: &init; >> /usr/local/share/perl5/Inline.pm:209: local ($/, $") = ("\n", ' + '); local ($\, $,); >> /usr/local/share/perl5/Inline.pm:209: local ($/, $") = ("\n", ' + '); local ($\, $,); >> /usr/local/share/perl5/Inline.pm:211: while (my $o = shift(@DAT +A_OBJS)) { >> main.pl:7: $usb = Device::USB->new(); >> /root/perl5/lib/perl5/i386-linux-thread-multi/Device/USB.pm:187: + my $class = shift; >> /root/perl5/lib/perl5/i386-linux-thread-multi/Device/USB.pm:189: + $init_ref->(); >> /root/perl5/lib/perl5/i386-linux-thread-multi/Device/USB.pm:175: + libusb_init();
i honestly don't know what's wrong, i can't figure it out, i don't have the slightest clue. libusb1.0 and devel are installed and when the program misses the line:
$usb = Device::USB->new();
gives "1" as an outcome. Any help would be appreciated. Or some guide that could give me some guidance...

In reply to Device::USB and core dumped by Arien0611

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-19 15:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found