1
gui@pcgui:~$ 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.5.1-1bionic) but it is not going to be installed
          Depends: r-recommended (= 3.5.1-1bionic) 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 dont what to do.

and, I've found the solution which failed to help me, if i input

gui@pcgui:~/Downloads$ sudo apt install r-base-core
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-core : Depends: libblas3 but it is not installable or
                        libblas.so.3 but it is not installable
               Depends: libcurl4 (>= 7.28.0) but it is not installable
               Depends: liblapack3 but it is not installable or
                        liblapack.so.3 but it is not installable
               Depends: libtcl8.6 (>= 8.6.0) but it is not installable
               Depends: libtk8.6 (>= 8.6.0) but it is not installable
               Recommends: r-recommended but it is not going to be installed
               Recommends: r-base-dev but it is not going to be installed
               Recommends: r-doc-html but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

and, for last, i've encountered a situation which asked me [Y/n] and I input Y and it aborted.

  • 1
    Please run sudo apt install -f – George Udosen Aug 23 '18 at 23:53
  • Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. – Guilherme Lindenmeyer Aug 24 '18 at 1:26
  • What is your Ubuntu version? Also please add output of apt-cache policy r-base r-base-core to the question. How did you got R 3.5 while Ubuntu Bionic has 3.4.4? – N0rbert Aug 24 '18 at 9:37
  • 2
    Possible duplicate of Unable to correct problems, you have held broken packages – karel Jan 20 at 17:36
0

I was getting a similar message when trying to install 3.5.2 over 3.4.4. I had to

sudo nano /etc/apt/sources.list`
Then added a # to the line 
deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/

Then I added a new line `

deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/

Then I saved that and ran the following

sudo apt-get clean
sudo apt-get update
sudo apt-get install r-base r-recommended r-cran-*

That seems to have fixed one of the issues I was having but I am still having an issue install libxml2-dev in R.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.