Thursday, October 25, 2012

Installing "mixOmics" under R-2.15.1 - fixing missing dependencies


The package "mixOmics" depends on a nunber of packages which render some of the 3D graphics output, among them "rgl" which in turn needs a OpenGL libraries/header files for successful compilation. These can be installed by issuing following command in a separate terminal window:
sudo apt-get install libglu1-mesa-dev libgl1-mesa-dev
 Once the system packages have been installed, issuing following command in your R session will install the "mixOmics" package:

Installing R-2.15.1 source package on Ubuntu 12.04 LTS

When attempting to install R-2.15.1 from source on a freshly installed Ubuntu 12.04.1 desktop I ran into several problems stemming from unmet dependencies. The by far most challenging to resolve was the missing of "libg2c0" which is required to run mixed C/FORTRAN code.

The error message from running ./configure in the R source directory:
checking whether mixed C/Fortran code can be run... configure: WARNING: cannot run mixed C/Fortan code
configure: error: Maybe check LDFLAGS for paths to Fortran libraries?
 After spending approximately two hours trying to resolve this unmet dependency by several different approaches, the command which brought the solution to this was:
sudo apt-get install cfortran
And some additional packages to resolve issues with HTML and PDF format R manuals:
apt-get install texlive-fonts-extra fig2ps
"fig2ps" in particular will install a lot of dependencies if TEX has not previously been installed on the system.