I'm trying to install sqldf package in an Ubuntu 14.04 machine, but I'm getting the following error:
Warning in install.packages :
package ‘sqldf’ is not available (for R version 3.0.2)
I tried to install the library libpq-dev as suggested from other post, but I still receive the message.
UPDATE
I'm trying to update R, but I'm getting the following message:
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.
I tried the solutions in this topic, but none worked
Look at the package page:
Depends: R (≥ 3.1.0), gsubfn (≥ 0.6), proto, RSQLite (≥ 1.0.0)
As the error message clearly states, you are using an older R 3.0.2 which is less than the required 3.1.0.
The fix is easy: read the Ubuntu-specific README, make the adjustment to install (current !!) R binaries as .deb package via apt-get from CRAN -- and you will have R 3.1.2 in no time.
Which will permit you to install the current sqldf as well.
I followed these instructions and everything worked!
sudo add-apt-repository ppa:marutter/rrutter
sudo apt-get update
sudo apt-get install r-base r-base-dev
You can find this resolved with this try this out:
# Install function for packages
packages<-function(x) {
x<-as.character(match.call()[[2]])
if (!require(x,character.only=TRUE)) {
install.packages(pkgs=x,repos="http://cran.r-project.org")
require(x,character.only=TRUE)
}
}
packages(ggplot2)
packages(reshape2)
packages(plyr)
# etc ...other packages
that's all enjoy..!!
Related
Desire is to installed R {sf} and {RPostgres} packages on Ubuntu 18.04.4.
Trying:
R$> install.packages("sf")
configure: error: gdal-config not found or not executable.
Some SO searching (eg https://stackoverflow.com/a/49181048/2802810) suggests this:
sh$> sudo apt-get install libgdal-dev
The following packagess have unmet dependencies: libpq-dev :
Depends: libpq5 (= 10.12-0Ubuntu0.18.04.1) but 12.3-1.pgdg18.04+1 is
to be installed E: Unable to correct problems, you have broken
packages.
I also need libpq-dev for R {RPostgres}.
You may want to add PPA, depending on your R version.
https://launchpad.net/~marutter/+archive/ubuntu/c2d4u
https://launchpad.net/~marutter/+archive/ubuntu/c2d4u3.5
https://launchpad.net/~c2d4u.team/+archive/ubuntu/c2d4u4.0+
After adding PPA, you can install using sudo apt install r-cran-sf and sudo apt install r-cran-rpostgres
OKaaaay. The box I'm working in didn't have a Postgres repo installed (https://www.postgresql.org/download/linux/ubuntu/). Never libpq libs and that was all it needed.
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?
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.
The message says:-
This error could be caused by required additional software packages which are missing or not installable.
Furthermore, there could be a conflict between software packages which are not allowed to be installed at the same time.
Details:-
The following packages have unmet dependencies:-
r-base: Depends: r-base-core (>= 3.4.3-1trusty0) but 3.4.3-1trusty0 is to be installed
Depends: r-recommended (= 3.4.3-1trusty0) but 3.4.3-1trusty0 is to be installed
I have also tried the code:-
sudo apt-add-repository -y ppa:texlive-backports/ppa
sudo apt-get update
I cannot understand how to instal R in Ubuntu 14.04.
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