Error while installing R 4.2.1 on ubuntu 18.04

We are getting below error while installing R 4.2.1 on Ubuntu 18.04,

  • apt-get -s -o Debug::pkgProblemResolver=yes install -y --allow-downgrades -o APT::Immediate-Configure=0 'r-base=4.2.1*' 'r-base-dev=4.2.1*' 'r-base-core=4.2.1*' 'r-recommended=4.2.1*'
    Reading package lists...
    Building dependency tree...
    Reading state information...
    Starting pkgProblemResolver with broken count: 1
    Starting 2 pkgProblemResolver with broken count: 1
    Investigating (0) r-recommended:amd64 < none -> 4.2.1-3.1804.0 @un puN Ib >
    Broken r-recommended:amd64 Depends on r-cran-mass:amd64 < none | 7.3-59-1.1804.0 @un uH >
    Considering r-cran-mass:amd64 1 as a solution to r-recommended:amd64 10012
    Reinst Failed because of protected r-base-core:amd64
    Considering r-cran-mass:amd64 1 as a solution to r-recommended:amd64 10012
    Considering r-cran-mass:amd64 1 as a solution to r-recommended:amd64 10012
    Considering r-cran-mass:amd64 1 as a solution to r-recommended:amd64 10012
    Considering r-cran-mass:amd64 1 as a solution to r-recommended:amd64 10012
    Considering r-cran-mass:amd64 1 as a solution to r-recommended:amd64 10012
    Considering r-cran-mass:amd64 1 as a solution to r-recommended:amd64 10012
    Considering r-cran-mass:amd64 1 as a solution to r-recommended:amd64 10012
    Considering r-cran-mass:amd64 1 as a solution to r-recommended:amd64 10012
    Considering r-cran-mass:amd64 1 as a solution to r-recommended:amd64 10012
    Considering r-cran-mass:amd64 1 as a solution to r-recommended:amd64 10012
    Considering r-cran-mass:amd64 1 as a solution to r-recommended:amd64 10012
    Considering r-cran-mass:amd64 1 as a solution to r-recommended:amd64 10012
    Considering r-cran-mass:amd64 1 as a solution to r-recommended:amd64 10012
    Broken r-recommended:amd64 Depends on r-cran-class:amd64 < none | 7.3-21-1.1804.0 @un uH >
    Considering r-cran-class:amd64 1 as a solution to r-recommended:amd64 10012
    Reinst Failed because of protected r-base-core:amd64
    Considering r-cran-class:amd64 1 as a solution to r-recommended:amd64 10012
    Considering r-cran-class:amd64 1 as a solution to r-recommended:amd64 10012
    Considering r-cran-class:amd64 1 as a solution to r-recommended:amd64 10012
    Considering r-cran-class:amd64 1 as a solution to r-recommended:amd64 10012
    Considering r-cran-class:amd64 1 as a solution to r-recommended:amd64 10012
    Considering r-cran-class:amd64 1 as a solution to r-recommended:amd64 10012
    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-recommended : Depends: r-cran-mass but it is not going to be installed
Depends: r-cran-class but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Is there any way to install specific version of R on ubuntu.

Hi, Please give reply, its very urgent issue.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.