我正在尝试在 Ubuntu 上安装 R 4.0,但出现此错误:
$ 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:
r-base : Depends: r-base-core (>= 4.0.0-1.2004.0) but it is not going to be installed
Depends: r-recommended (= 4.0.0-1.2004.0) but it is not going to be installed
Recommends: r-base-html but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
按照https://cran.r-project.org/bin/linux/ubuntu/README.html的建议,我已经运行了这些命令来设置 apt 以接收 R 4.0 :
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/'
sudo apt-get update
我做错了什么,我该如何解决?
我之前确实在这个系统上安装了 R 3.4,并用
sudo apt-get remove r-*
sudo apt-get purge r-*
我这样做是不是把事情搞砸了?