Keeping up to Date
One of the most frustrating things about using distributions and not installing from source is making sure that the programs are up to date. This is especially true of a rapidly changing program such as R and Bioconductor. So the first thing that is needed is to add the repository to those searched for updates.
You can do this by adding the following to the /etc/apt/sources.list file using your favourite editor (do not forget to use sudo)
deb http://cran.ma.imperial.ac.uk/bin/linux/ubuntu precise/
deb-src http://cran.ma.imperial.ac.uk/bin/linux/ubuntu precise/
For R to install the rgl library properly you also need to make sure that you have all of the headers installed (gl.h and glu.h). You can do this by installing the following libraries.
sudo apt-get install build-essential libsdl1.2debian libsdl1.2-dev libgl1-mesa-dev libglu1-mesa-dev libsdl-image1.2 libsdl-image1.2-dev
When you install the packages it is best if you install as root as some core packages need to be updated and so run R as sudo
You need curl and xml to connect to databases.
sudo apt-get install libcurl4-gnutls-dev
sudo apt-get install libxml++2.6-dev