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