Receiving “Unmet dependency” while installing r-base on Ubuntu 14.10

雨燕双飞 提交于 2021-02-11 15:16:31

问题


I am trying to install R on Ubuntu 14.10

When I am giving the command to download r-base, I get the following error

roy@laptop:~$ 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 (>= 3.1.2-1precise0) but it is not going to be installed
          Depends: r-recommended (= 3.1.2-1precise0) 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.

What can I do? I found adding backports of raring could help. I tried several servers, but I'm getting a 404.

Here are the following changes I brought in /etc/apt/sources.list

## R
deb http://cran.cnr.Berkeley.edu/bin/linux/ubuntu precise/



## Raring backports
deb http://us.archive.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse

回答1:


Step 1:

You can use any of the below in your /etc/apt/sources.list file to get the latest copy of R, replace <my.favorite.cran.mirror> by the actual URL of your favorite CRAN mirror. See http://cran.r-project.org/mirrors.html for the list of CRAN mirrors.

deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu utopic/
or
deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu trusty/
or
deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu precise/
or
deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu lucid/

Step 2:

To install the complete R system, use below on command line:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo add-apt-repository ppa:marutter/rdev
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install r-base

For a detailed instruction, please follow the steps given in the link here!



来源:https://stackoverflow.com/questions/28273441/receiving-unmet-dependency-while-installing-r-base-on-ubuntu-14-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!