Hello I am trying to install r-base for Ubuntu 16.04.
I have followed the steps at https://cran.r-project.org/bin/linux/ubuntu/README.html
However I am getting a 'unmet dependencies' error when I run sudo apt-get install r-base
The following packages have unmet dependencies: r-base : Depends: r-recommended (= 3.4.4-1xenial0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Any ideas for getting around this? Thanks in advance!
Go into R, click on Packages (at the top of the R console), then click on "Install package(s) from local zip files", then find the zip file with arm from wherever you just saved it. Do the same thing to install each of the other packages you want to install.
On all platforms you need to install a version of R to target development against; you should install R before running any dependency installation scripts in RStudio. RStudio itself is compatible with R version 3.0.1 or later, but version 3.1 or greater is recommended for development installations.
Done Package r-base is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: r-base-core r-doc-info r-doc-html r-base-html r-base-core:i386 E: Package 'r-base' has no installation candidate
The following packages have unmet dependencies: r-base : Depends: r-recommended (= 3.4.4-1xenial0) but it is not going to be installed E: Unable to correct problems, you have held broken packages. Any ideas for getting around this?
On Linux all dependencies for RStudio Server can be installed installed using the scripts in: There is a separate script for systems with debian, yum, or zypper based package management. For example, to install dependencies for debian systems:
Running the following commands seems to have solved my problem:
sudo apt --fix-broken install
sudo apt-get update
sudo apt-get upgrade
Running the following fixed it for me, but this solution uses r-base-dev not r-base (r-base still didn't work).
sudo apt --fix-broken install
sudo apt autoremove
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install r-base-dev
Make sure to check in the software and properties that if your restricted and universe repositories are enabled. Here's a link with more information.
I started getting this issue because I added the wrong apt-repository for my version of Ubuntu (focal fossa instead of bionic).
Solved by doing sudo vim /etc/apt/sources.list
, then deleting any lines containing focal
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With