简体   繁体   English

尝试安装 R 4.0.1,但遇到 Ubuntu 问题

[英]Trying to install R 4.0.1, but having an issue with Ubuntu

I tried to upgrade the last version of R in my ubuntu server, following other blogs I uninstall R from my server and I tried to install doing these steps:我尝试在我的 ubuntu 服务器中升级 R 的最新版本,按照其他博客我从我的服务器卸载 R 并尝试执行以下步骤进行安装:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/'

sudo apt update

I followed these steps from here https://www.digitalocean.com/community/tutorials/how-to-install-r-on-ubuntu-18-04我从这里开始执行这些步骤https://www.digitalocean.com/community/tutorials/how-to-install-r-on-ubuntu-18-04

When I tried to run the last command: sudo apt-get install r-base当我尝试运行最后一个命令时: sudo apt-get install r-base

I got this error:我收到此错误:

sudo apt 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.2-1.1804.0) but it is not going to be installed
          Depends: r-recommended (= 4.0.2-1.1804.0) but it is not going to be installed
          Recommends: r-base-html but it is not going to be installed


apt-cache policy r-base yield: apt-cache policy r-base产量:


-base:
  Installed: (none)
  Candidate: 4.0.2-1.1804.0
  Version table:
     4.0.2-1.1804.0 500
        500 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/ Packages
     4.0.1-1.1804.0 500
        500 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/ Packages
     4.0.0-1.1804.0 500
        500 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/ Packages
     3.6.3-2 500
        500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
     3.4.4-1xenial0 500
        500 https://cran.rstudio.com/bin/linux/ubuntu xenial/ Packages
     3.4.3-1xenial0 500
        500 https://cran.rstudio.com/bin/linux/ubuntu xenial/ Packages
     3.4.2-2xenial2 500
        500 https://cran.rstudio.com/bin/linux/ubuntu xenial/ Packages
     3.4.2-1xenial1 500
        500 https://cran.rstudio.com/bin/linux/ubuntu xenial/ Packages
     3.4.1-2xenial0 500
        500 https://cran.rstudio.com/bin/linux/ubuntu xenial/ Packages
     3.4.1-1xenial0 500
        500 https://cran.rstudio.com/bin/linux/ubuntu xenial/ Packages
     3.4.0-1xenial0 500
        500 https://cran.rstudio.com/bin/linux/ubuntu xenial/ Packages
     3.3.3-1xenial0 500
        500 https://cran.rstudio.com/bin/linux/ubuntu xenial/ Packages
     3.3.2-1xenial0 500
        500 https://cran.rstudio.com/bin/linux/ubuntu xenial/ Packages
     3.3.1-1xenial0 500
        500 https://cran.rstudio.com/bin/linux/ubuntu xenial/ Packages
     3.3.0-2xenial0 500
        500 https://cran.rstudio.com/bin/linux/ubuntu xenial/ Packages
     3.3.0-1xenial0 500
        500 https://cran.rstudio.com/bin/linux/ubuntu xenial/ Packages
     3.2.5-1xenial 500
        500 https://cran.rstudio.com/bin/linux/ubuntu xenial/ Packages

Thanks for your help!谢谢你的帮助!

I ran into the same issue...what kind of processor are you on?我遇到了同样的问题...您使用的是哪种处理器? This happened to me because I was installing on an arm64 machine, and the main cran repo does not have packages for that architecture.这发生在我身上是因为我在 arm64 机器上安装,而主要的 cran repo 没有那个架构的包。 I removed the reference to the cran repository in /etc/apt/sources.list (just using a text editor) and installed from http://ports.ubuntu.com/ubuntu-ports .我在 /etc/apt/sources.list 中删除了对 cran 存储库的引用(仅使用文本编辑器)并从http://ports.ubuntu.com/ubuntu-ports安装。 This worked fine, but I have an older version of R than what's available on the cran repo.这工作正常,但我的 R 版本比 cran repo 上可用的版本旧。 I'll either have to find a different source for the packages, or compile locally, or live with R 3.4.4.我要么必须为这些包找到不同的来源,要么在本地编译,要么使用 R 3.4.4。

Your quoted output is partial and we cannot see what is really behind it.你引用的 output 是部分的,我们看不到它背后的真正含义。

My suspicion is that some other package the binary depends on is too old.怀疑二进制文件所依赖的其他一些 package 太旧了。 In general the apt install command assumes a current system.通常apt install命令假定当前系统。 So maybe try所以也许试试

sudo apt update
sudo apt upgrade
sudo apt install r-base

and update your question with any "odd" errors you are seeing.并用您看到的任何“奇怪”错误更新您的问题。 I maintain the underlying Debian package r-base , and run these same Ubuntu binaries on several machines too without any issues.我维护底层 Debian package r-base ,并在几台机器上运行这些相同的 Ubuntu 二进制文件也没有任何问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM