How can I install libpcap header files on Ubuntu 12.04?

Use this:

sudo apt-get install libpcap-dev

to install libpcap. try these commands

cd /usr
mkdir nembuild
cd nembuild    
wget http://www.tcpdump.org/release/libpcap-1.5.3.tar.gz
tar -xf libpcap-1.5.3.tar.gz
cd libpcap-1.5.3
./configure
make && make install

Enjoy!!!