In Ubuntu, libpcap-0.8 is already installed by default. To install the gopacket library, though, you also need the header files in the development package. You can install the header files through the libpcap-dev package. We will also install git because it is needed to run the go get command later when installing gopacket:
sudo apt-get install git libpcap-dev