# Problems with Pcacp Library

**URL:** <https://www.ruby-forum.com/t/problems-with-pcacp-library/151838>\
**Category:** Ruby\
**Created:** [October 26, 2008, 6:45pm UTC](https://www.ruby-forum.com/t/problems-with-pcacp-library/151838 "2008-10-26T18:45:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubystudent](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9c0ed/32.png) [@rubystudent](https://www.ruby-forum.com/u/rubystudent)\
**Post date:** [October 26, 2008, 6:45pm UTC](https://www.ruby-forum.com/t/problems-with-pcacp-library/151838/1 "2008-10-26T18:45:05Z")

</div>

Hi!

I want to work with the pcap library, and I installed libpcap and pcap  
library in Ubuntu, but when I try a code, there is an error:

/usr/lib/ruby/1.8/pcaplet.rb:51:in `lookupdev': no suitable device found (Pcap::PcapError) from /usr/lib/ruby/1.8/pcaplet.rb:51:in`initialize’  
from httpsniff.rb:4:in `new’  
from httpsniff.rb:4

I searched but i didnt find what to do (I’ve already required the  
library…)

Thanks, and sorry for my english ^^

---

<div class="post-metadata">

**Author:** ![rubystudent](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9c0ed/32.png) [@rubystudent](https://www.ruby-forum.com/u/rubystudent)\
**Post date:** [October 27, 2008, 7:41pm UTC](https://www.ruby-forum.com/t/problems-with-pcacp-library/151838/2 "2008-10-27T19:41:07Z")

</div>

On Sun, Oct 26, 2008 at 12:44 PM, Protos J. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I searched but i didnt find what to do (I’ve already required the  
> library…)

Do you have any interface available that the library can use to sniff  
from?  
If so,  
be sure you run your script as root.

If still doesn’t work post the code your are trying to run.

-drd
