Hi,
I am working on project Signature Based IDS.
For that reason I need to install libpcap on my machine.
I have problem in installing.I have libpcap source directory.
as I give command
# ./configure
I found following error
configure: error: Your operating system's lex is insufficient to compile
libpcap. flex is a lex replacement that has many advantages, including
being able to compile libpcap. For more information, see
http://www.gnu.org/software/flex/flex.html .

please help in installing libpcap.Step by step.
Thanks in advance.

Is there any reason you're trying to build it from source rather than installing it from the package repository?

sk:~# apt-cache search libpcap | grep ^libp
libpcap-dev - Development library for libpcap (transitional package)
libpcap-ruby1.8 - Ruby interface for the libpcap packet capture library
libpcap0.7 - System interface for user-level packet capture
libpcap0.7-dev - Development library and header files for libpcap 0.7
libpcap0.8 - System interface for user-level packet capture
libpcap0.8-dev - Development library and header files for libpcap 0.8
libpcap0.9 - Dummy package, can be safely removed
libpcap0 - System interface for user-level packet capture.
sk:~# apt-get install libpcap-dev

You could just install it with libaptituted unless you *want* to build it from source. You could also use aptitude to build from source:

apt-get --only-source build-dep libpcap-dev 
apt-get --only-source -b source libpcap-dev 
ls *.deb
dpkg -i libpcap*dev*deb

I don't have internet connection that is why I am installing from source instead of repository.As I get internet connection I will try as you said.
I think what ever you have given those are commands which I have to run.
I am new to linux.
Thank you sknake.

You're welcome. Let me know if you have any problems in getting libpcap installed and we'll go from there

when i install libpcap these errors are cmng PLS HELP ME
Reading package lists... Error!
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_natty_main_binary-i386_Packages
E: The package lists or status file could not be parsed or opened.

could you give me the configuration? i just configured the libpcap include, i can't do well.

Hi arunmagar, I don't know is it better to talk with you here or not, because I could not managed to find your mailing address. As I saw you were working on signature based IDS, I am also working on it but I have been stuck somewhere. I hope you are going to help to get me out of this

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.