Ubuntu: unable to launch R or reinstall R due to missing libblas.so.3gf


I've run following command:

sudo apt-get install r-base  

and I got:

Reading package lists... Done  Building dependency tree         Reading state information... Done  Some packages could not be installed. This may mean that you have  requested an impossible situation or if you are using the unstable  distribution that some required packages have not yet been created  or been moved out of Incoming.  The following information may help to resolve the situation:    The following packages have unmet dependencies:  

then run

sudo -i R  

but it shows:

/usr/lib/R/bin/exec/R: error while loading shared libraries:    libblas.so.3gf: cannot open shared object file: No such file or directory  


Before the steps sudo apt-get purge r-base

If your are in 14.04:

  sudo sh -c 'echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/" >> /etc/apt/sources.list'    gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9    gpg -a --export E084DAB9 | sudo apt-key add -    sudo apt-get update    sudo apt-get -y install r-base  

If you are in 16.04

  sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9    sudo add-apt-repository 'deb [arch=amd64,i386] https://cran.rstudio.com/bin/linux/ubuntu xenial/'    sudo apt-get update    sudo apt-get install r-base  


libblas.so.3gf is provided by the package revolution-mkl (REvolution Computing high-performance numeric libraries for R) so install it. Run the following commands and comment if they give any error messages.

sudo apt update    sudo apt upgrade    sudo apt install r-base-core r-revolution-core revolution-mkl  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »