These instructions are for Elementary OS, but I expect they are very similar for Ubuntu 12.04.
First, make sure your system is fully updated as a starting point for this adventure.
Download Wireshark source code (1.10 or later)
Un-tar it, in may case the command is:
tar -xaf wireshark-1.10.6.tar.bz2
Obviously, that might change depending on what version you download.
We need to install glib-2.0, gtk+ 2.0, libpcap developer files as well as yacc/lex. We can do this in one fell swoop with:
sudo apt get install libgtk2.0-dev libpcap-dev bison flex
Now we can start a standard build process
./configure && make
Test out your compile by running:
If you get “pixmap” errors, install the pixbuf engine:
sudo apt-get install gtk2-engines-pixbuf
Wireshark can be installed system-wide with:
sudo make install
Finally, make sure your system finds installed libraries at runtime, add the following lines to your /etc/ld.so.conf: