Problems installing R 3.5 on Ubuntu 16.04 - r

Recently I had to update R from 3.4.4 to 3.5 for installing bioconductor packages. For doing that I followed the steps on this link.
But now I have the problem that r studio do not work for the problem:
R shared library (/usr/local/lib/R/lib/libR.so) not found. If this is
a custom build of R, was it built with the --enable-R-shlib option?
For that reason I tried to reinstall R 3.4.4 with the command:
sudo apt-get install r-base
But it returns me this error:
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-recommended (= 3.5.1-2xenial) but it is not
going to be installed
E: Unable to correct problems, you have held broken packages.
Does anyone know how to remove completely R (3.5) and installing again the 3.4 version?
Thank you all.
Edit: R works on command line with the 3.5 version and I cannot install other packages like:
$ sudo apt-get install libgdal-dev
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:
libgdal-dev : Depends: libarmadillo-dev but it is not going to be installed
Depends: libdap-dev but it is not going to be installed
Depends: libgeotiff-dev but it is not going to be installed
Depends: libgif-dev but it is not going to be installed
Depends: libhdf4-alt-dev but it is not going to be installed
Depends: libhdf5-dev but it is not going to be installed
Depends: libjpeg-dev
Depends: libmysqlclient-dev but it is not going to be installed
Depends: libnetcdf-dev but it is not going to be installed
Depends: libpoppler-private-dev but it is not going to be installed
Depends: libpq-dev but it is not going to be installed
Depends: libtiff-dev
Depends: libxml2-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Related

Completely remove R and its files in Linux mint

I was having trouble with R packages so I decided to uninstall to do fresh install. Now I cannot even re-install R. I am using Linux Mint. what I did is:
Removed all directories found with .libPaths()
And in the terminal:
sudo apt-get remove r-base-core
sudo apt-get remove r-base
sudo apt-get autoremove
Now when I try to install R following https://cran.r-project.org/ tutorial, I get many errors:
sudo apt update -qq
E: The repository 'https://cloud.r-project.org/bin/linux/ubuntu una-cran40/ Release' does not have a Release file.
apt install --no-install-recommends 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-recommended (= 3.6.3-2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
apt install r-recommended
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-recommended : Depends: r-cran-foreign (>= 0.7-2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
apt install r-cran-foreign
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-cran-foreign : Depends: r-base-core (>= 4.0.0-1.2004.0) but 3.6.3-2 is to be installed
Depends: r-api-4.0 but it is not installable
E: Unable to correct problems, you have held broken packages.

Unable to install latest R version on Ubuntu 18.04 linux

I want to be able to install the latest stable R release for Ubuntu 18.04, I had the ubuntu version installed and so I removed it and then followed several guides like in this link.
No matter what I do I get the following output when I issue a sudo apt-get install r-base:
sudo apt 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.6.1-3disco) but it is not going to be installed
Depends: r-recommended (= 3.6.1-3disco) 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's wrong?

How to install R on ubuntu 16.10 via the terminal?

I'm trying to install R from the terminal following this site:
https://www.r-bloggers.com/how-to-install-r-on-linux-ubuntu-16-04-xenial-xerus/
When I execute sudo apt-get install r-base, I get the following error:
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.3.2-1xenial0) but it is not going to be installed
Depends: r-recommended (= 3.3.2-1xenial0) 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.
Add the two others to the command, and see the errors it generates, ie do
sudo apt-get install r-base r-base-core r-recommended
You likely you have something installed which conflicts. Many (and I mean thousands) of us run these packages just fine.
You can also consider the r-sig-debian mailing list.

Problems installing R base

I keep getting this error when trying to install R
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.2.0-3trusty) but it is not going to be installed
Depends: r-recommended (= 3.2.0-3trusty) 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.
Any one knows how to solve this?
Try installing all at once
sudo apt-get install r-base r-base-core r-recommended r-base-html
but from your description is not clear how you manage to get into this situation in the first place. This should not happen under normal use.

r-base-core build on ubuntu 10.04 failing because of missing libjpeg8 package

So the libjpeg8 package on 10.04 has reached EOL.
Is there a way to locate and install the legacy package for this?
$ sudo apt-get 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: libc6 (>= 2.15) but 2.11.1-0ubuntu7.13 is to be installed
Depends: libjpeg8 (>= 8c) but it is not installable
Depends: liblzma5 (>= 5.1.1alpha+20110809) but it is not installable
Depends: libpcre3 (>= 8.10) but 7.8-3build1 is to be installed
Recommends: r-recommended but it is not going to be installed
E: Broken packages
You can try the following commands.
sudo apt-get install -f
This would install any dependencies that your previous installs missed.
If that doesn't help, please refer to the following link:
https://askubuntu.com/questions/140246/how-do-i-resolve-unmet-dependencies

Resources