'Packages' are bits of software (source code, binary executables, data, etc.) which are maintained in a central repository, to make it easier to find them and keep them up-to-date. The way to install and manage packages on Ubuntu is through the apt-get command line tool (tutorial
here) or similar. Ubuntu can access uses the Debian package archives.
So, to check (for example) the mesaGL package is available, in a terminal try these steps:
1. apt-get update
2. apt-cache search mesa
The second step should print (among other things) info about the package 'libgl1-mesa-dev'. That's the one you want. Then, to install the package:
sudo apt-get install libgl1-mesa-dev
You'll need administrator priveleges to sudo, and you'll have to type in your password. But after that it will fetch the mesaGL package and install it on your system. It will install the library into a place where the Extempore compile process can find it.