::: Zany's Homepage ::: Zany Wiki | »çÀÌÆ® ÅëÇÕ °Ë»ö
 
 
 

[Ubuntu/CentOS] How to install libpcap on Ubuntu

°Ô½ÃÆÇ
Unix/Linux
ÀÛ¼ºÀÚ
helix
ÀÛ¼ºÀÏ
2012-05-10 11:43:15
ÀÐÀº¼ö
4119
ÆòÁ¡
   
Ç¥½Ã¿É¼Ç
HTML»ç¿ë | ÀÚµ¿BRűנ| °ø¹é¹®ÀÚÇã¿ë | °¡¿îµ¥Á¤·Ä | °íÁ¤Æø±Û²Ã | ÀÚµ¿URL¸µÅ© | ¸¶¿ì½º¼±ÅÃ
°ü·Ã¸µÅ©01
http://xgjonathan.blogspot.com/2011/04/how-to-install-libpcap-on-ubuntu.html 
°ü·Ã¸µÅ©02
http://blog.naver.com/PostView.nhn?blogId=plenilunel&logNo=70115574933&redirect=Dlog&widgetTypeCall=true 
Ubuntu 12.04, CentOS 6.0 32bit ¹öÀü¿¡¼­ Á¤»ó ¼³Ä¡µÇ´Â °Í È®ÀÎÇÏ¿´´Ù.
´ç¿¬ÇÑ ¸»ÀÌ°ÚÁö¸¸... ¼³Ä¡½Ã c ÄÄÆÄÀÏ·¯°¡ ÇÊ¿äÇÏ´Ù.

gcc ´Â apt-get (ubuntu) À̳ª yum (CentOS) À» ÀÌ¿ëÇÏ¿© °£ÆíÈ÷ ¼³Ä¡ÇÒ ¼ö ÀÖ´Ù.

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

Libpcap is a portable C/C++ library for network traffic capture.

Although libpcap is primarily a packet-capturing tool,
it also can create and manipulate packets from saved files,
which can then be used in the wide variety of tools that support the libpcap format.

In this article, I will show how to install libpcap on Ubuntu.

1. Download libpcap-1.0.0.tar.gz (512.0KB) from http://www.tcpdump.org
    and decompress it (tar zxvf libpcap-1.0.0.tar.gz) to your self-defined directory;
2. Download flex-2.5.35.tar.gz (1.40MB) from http://flex.sourceforge.net
    and decompress it (tar zxvf flex-2.5.35.tar.gz) to your self-defined directory;
3. Download bison-2.4.1.tar.gz (1.9MB) from http://ftp.gnu.org/gnu/bison
    and decompress it (tar zxvf bison-2.4.1.tar.gz) to your self-defined directory;
4. Download m4-1.4.13.tar.gz (1.2MB) from http://ftp.gnu.org/gnu/m4
    and decompress it (tar zxvf m4-1.4.13.tar.gz) to your self-defined directory;

Then, enter into the directories m4-1.4.13, bison-2.4.1, flex-2.5.35, libpcap-1.0.0 in the order,
and execute the following commands:
(sudo) ./configure
(sudo) make
(sudo) make install

= libpcap Àº ./configure | make | make install ÈÄ, Á¤»óÀûÀ¸·Î ÄÄÆÄÀÏ µÇ¾ú´Ù¸é
= ls -altr Çغ¸¸é libpcap.so.1.x.x ÆÄÀÏÀÌ »ý¼ºµÇ¾î ÀÖ´Â °É º¼ ¼ö ÀÖ´Ù.
= sudo cp libpcap.so.1.x.x /usr/lib ¸í·É¾î·Î /usr/lib ¿¡ º¹»çÇÏ°í,
= ln -s /usr/lib/libpcap.so.1.x.x libpcap.so.1 ¸í·É¾î·Î ½Éº¼¸¯ ¸µÅ©¸¦ °É¾îÁØ´Ù.

Now, everything should work well. And you can get a .c file to test your installation.

Notice: installing libpcap and running your programs should have an access to your root priority.
Good Luck! ^_^

 °Ô½ÃÆÇ ±Û ¸ñ·Ï
No Subject Poster Hits Posted
3036 helix 2630 2012-05-14 22:06:21
3034 helix 1539 2012-05-14 20:52:43
3016 helix 1849 2012-05-10 20:59:51
3015 helix 2007 2012-05-10 20:56:48
3008 helix 2409 2012-05-10 15:29:25
helix 4119 2012-05-10 11:43:15
2992 helix 3211 2012-05-08 13:00:23
2975 helix 1632 2012-05-06 17:47:49
2960 helix 2645 2012-05-02 00:49:14
2959 helix 1614 2012-05-01 10:16:34
2958 helix 6527 2012-05-01 01:14:02
ÄÚ¸àÆ®
ÀÛ¼ºÀÚ
                       
 
zany.kr
  Copyright ¨Ï 2002-2010 Zany's Programming Lab. All Rights Not Reserved.
temporary This Page loads on 0.016 Secs