0

while installing a newer latest version of r by removing the previous version of r(3.0.2) I got the following problem.

anupam :~$ 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.3.20150410-1trusty) but it is not going to be installed
          Depends: r-recommended (= 3.1.3.20150410-1trusty) 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.

I have gone through the the most voted answer installing latest version of R on ubuntu ,,

I tried installing it from aptitude too.. but it didn't worked I tried for sudo apt-get autoclean too .. how could I resolve this ??

lazarus
  • 1,563
  • 1
    As you have trusty (14.04), and not precise (12.04), the line deb http://cran.rstudio.com/bin/linux/ubuntu precise/ needs to be deb http://cran.rstudio.com/bin/linux/ubuntu trusty/. Change that line, then run sudo apt-get update, then sudo apt-get install r-base. – mikewhatever Apr 17 '15 at 03:59

1 Answers1

2

As you have trusty (14.04), and not precise (12.04), the line

deb http://cran.rstudio.com/bin/linux/ubuntu precise/ needs to be
deb http://cran.rstudio.com/bin/linux/ubuntu trusty/.

Change that line, then run
sudo apt-get update
sudo apt-get install r-base.

mikewhatever
  • 32,638
  • thanx @mikewhatever, for the help I have followed your solution and also updated the ppa information of /etc/apt/sources.list.d/ppa package ,, and changed trusty to raring and it worded fine for me . – lazarus Apr 17 '15 at 12:45