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:
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
When I tried to run the last command: 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:
-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!
Your quoted output is partial and we cannot see what is really behind it.
My suspicion is that some other package the binary depends on is too old. In general the apt install
command assumes a current system. 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.