I had R 2.0.14 on my ubuntu 12.04 LTS and was trying to use the command
install.packages("fpc")
ERROR: dependencies ‘mclust’, ‘flexmix’ are not available for package ‘fpc’
That is where is realized that my R version is old to have these packages and hence the obvious solution is to uninstall and install latest R
These details i found on StackOverflow and it worked for Me
Uninstall old R
sudo apt-get remove r-base-core
Adding deb to sources.list
sudo nano /etc/apt/sources.list
deb http://cran.rstudio.com/bin/linux/ubuntu precise/
precise is your ubuntu name (may be different)
Add key to sign CRAN packages
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
Add specific PPA to the system
sudo add-apt-repository ppa:marutter/rdev
sudo apt-get update
sudo apt-get upgrade
installing
sudo apt-get install r-base
From R to check version
version
should give you
version.string R version 3.0.1 (2013-05-16)
Credit Anando Mahto (StackOverflow member)