Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7087857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:43:33+00:00 2026-05-28T07:43:33+00:00

This must be a relatively newb question but I am still stuck. I know

  • 0

This must be a relatively newb question but I am still stuck. I know there is a simple solution to this. I’ve done some googling but could not find an exact answer. Here is the error I get…

C:\Ruby193\include\ruby-1.9.1\i386-mingw32>gem install pcap
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing pcap:
        ERROR: Failed to build gem native extension.

        C:/Ruby193/bin/ruby.exe extconf.rb
checking for socket() in -lsocket... no
checking for gethostbyname() in -lxnet... no
checking for hstrerror()... no
checking for pcap.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Clearly I am missing some libraries but I not know how to get these nor do I know where they should be located when attempting to install pcap.

mkmf.log

    have_library: checking for socket() in -lsocket... -------------------- no

"gcc -o conftest -IC:/Ruby193/include/ruby-1.9.1/i386-mingw32 -IC:/Ruby193/include/ruby-1.9.1/ruby/backward -IC:/Ruby193/include/ruby-1.9.1 -I.    -I/usr/local/include conftest.c  -L. -LC:/Ruby193/lib -L/usr/local/lib     -lmsvcrt-ruby191  -lshell32 -lws2_32 -limagehlp  "
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <winsock2.h>
4: #include <windows.h>
5: int main() {return 0;}
/* end */

"gcc -o conftest -IC:/Ruby193/include/ruby-1.9.1/i386-mingw32 -IC:/Ruby193/include/ruby-1.9.1/ruby/backward -IC:/Ruby193/include/ruby-1.9.1 -I.    -I/usr/local/include conftest.c  -L. -LC:/Ruby193/lib -L/usr/local/lib     -lmsvcrt-ruby191 -lsocket  -lshell32 -lws2_32 -limagehlp  "
c:/users/user/downloads/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -lsocket
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <winsock2.h>
4: #include <windows.h>
5: 
6: /*top*/
7: int main() {return 0;}
8: int t() { void ((*volatile p)()); p = (void ((*)()))socket; return 0; }
/* end */

"gcc -o conftest -IC:/Ruby193/include/ruby-1.9.1/i386-mingw32 -IC:/Ruby193/include/ruby-1.9.1/ruby/backward -IC:/Ruby193/include/ruby-1.9.1 -I.    -I/usr/local/include conftest.c  -L. -LC:/Ruby193/lib -L/usr/local/lib     -lmsvcrt-ruby191 -lsocket  -lshell32 -lws2_32 -limagehlp  "
conftest.c: In function 't':
conftest.c:8:1: error: too few arguments to function 'socket'
c:\users\user\downloads\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/winsock2.h:553:35: note: declared here
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <winsock2.h>
4: #include <windows.h>
5: 
6: /*top*/
7: int main() {return 0;}
8: int t() { socket(); return 0; }
/* end */

--------------------

have_library: checking for gethostbyname() in -lxnet... -------------------- no

"gcc -o conftest -IC:/Ruby193/include/ruby-1.9.1/i386-mingw32 -IC:/Ruby193/include/ruby-1.9.1/ruby/backward -IC:/Ruby193/include/ruby-1.9.1 -I.    -I/usr/local/include conftest.c  -L. -LC:/Ruby193/lib -L/usr/local/lib     -lmsvcrt-ruby191 -lxnet  -lshell32 -lws2_32 -limagehlp  "
c:/users/user/downloads/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -lxnet
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <winsock2.h>
4: #include <windows.h>
5: 
6: /*top*/
7: int main() {return 0;}
8: int t() { void ((*volatile p)()); p = (void ((*)()))gethostbyname; return 0; }
/* end */

"gcc -o conftest -IC:/Ruby193/include/ruby-1.9.1/i386-mingw32 -IC:/Ruby193/include/ruby-1.9.1/ruby/backward -IC:/Ruby193/include/ruby-1.9.1 -I.    -I/usr/local/include conftest.c  -L. -LC:/Ruby193/lib -L/usr/local/lib     -lmsvcrt-ruby191 -lxnet  -lshell32 -lws2_32 -limagehlp  "
conftest.c: In function 't':
conftest.c:8:1: error: too few arguments to function 'gethostbyname'
c:\users\user\downloads\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/winsock2.h:555:57: note: declared here
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <winsock2.h>
4: #include <windows.h>
5: 
6: /*top*/
7: int main() {return 0;}
8: int t() { gethostbyname(); return 0; }
/* end */

--------------------

have_func: checking for hstrerror()... -------------------- no

"gcc -o conftest -IC:/Ruby193/include/ruby-1.9.1/i386-mingw32 -IC:/Ruby193/include/ruby-1.9.1/ruby/backward -IC:/Ruby193/include/ruby-1.9.1 -I.    -I/usr/local/include conftest.c  -L. -LC:/Ruby193/lib -L/usr/local/lib     -lmsvcrt-ruby191  -lshell32 -lws2_32 -limagehlp  "
conftest.c: In function 't':
conftest.c:8:53: error: 'hstrerror' undeclared (first use in this function)
conftest.c:8:53: note: each undeclared identifier is reported only once for each function it appears in
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <winsock2.h>
4: #include <windows.h>
5: 
6: /*top*/
7: int main() {return 0;}
8: int t() { void ((*volatile p)()); p = (void ((*)()))hstrerror; return 0; }
/* end */

"gcc -o conftest -IC:/Ruby193/include/ruby-1.9.1/i386-mingw32 -IC:/Ruby193/include/ruby-1.9.1/ruby/backward -IC:/Ruby193/include/ruby-1.9.1 -I.    -I/usr/local/include conftest.c  -L. -LC:/Ruby193/lib -L/usr/local/lib     -lmsvcrt-ruby191  -lshell32 -lws2_32 -limagehlp  "
C:\Users\USER\AppData\Local\Temp\ccbjKHSc.o:conftest.c:(.text+0x19): undefined reference to `hstrerror'
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <winsock2.h>
4: #include <windows.h>
5: 
6: /*top*/
7: int main() {return 0;}
8: int t() { hstrerror(); return 0; }
/* end */

--------------------

have_header: checking for pcap.h... -------------------- no

"gcc -E -IC:/Ruby193/include/ruby-1.9.1/i386-mingw32 -IC:/Ruby193/include/ruby-1.9.1/ruby/backward -IC:/Ruby193/include/ruby-1.9.1 -I.    -I/usr/local/include  conftest.c -o conftest.i"
conftest.c:5:18: fatal error: pcap.h: No such file or directory
compilation terminated.
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <winsock2.h>
4: #include <windows.h>
5: #include <pcap.h>
/* end */

--------------------
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:43:33+00:00Added an answer on May 28, 2026 at 7:43 am

    The end solution was to not use pcap rub which seems to be fairly outdated.

    I tried PCAP rub and continued to run into issues. You can follow the thread here where Jonm ultimately helped me to get up and running.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm sure this is a relatively simple question, and there must be a good
I know this must be a relatively simple problem, but Google has failed me.
I know this must be relatively simple, but I have a dataset of JSON
I am sure there must be a relatively straightforward way to do this, but
This must be a very simple question, but I don't seem to be able
I feel like this must be simple to do but can't get it done
This should have been a relatively simple one but I must be making a
This must be a stupid question, but nevertheless I find it curious: Say I
This must be simple, but I can't seem to figure it out. I am
This must be a dumb question, but I don't see any obvious references. How

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.