由于缺少 libblas.so.3gf,无法启动 R 或重新安装 R

由于缺少 libblas.so.3gf,无法启动 R 或重新安装 R

我已经运行以下命令:

sudo apt-get install r-base

我得到了:

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:

然后运行

sudo -i R

但它显示:

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

答案1

执行步骤之前 sudo apt-get purge r-base

如果你使用的是 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 添加 -

sudo apt-get 更新

sudo apt-get -y 安装 r-base

如果你使用的是 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 更新

sudo apt-get 安装 r-base

答案2

libblas.so.3gf 由该包提供革命-mkl(REvolution Computing 高性能 R 数字库)因此请安装它。运行以下命令,如果它们给出任何错误消息,请发表评论。

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

相关内容