Problems installing ShortRead package in R -- can't install RCurl dependency - r

I'm working with Bioconductor and I would like to install the ShortRead package. i've tried many times but I come to an error installing the dependency package RCurl. I get this error in RStudio:
Cannot find curl-config
What shall I do? Is there an alternative to ShortRead?
Thanks ;)

What OS are you using?
sessionInfo ()?
is libcurl (probably you need the dev version) installed? RCurl links to libcurl. RCurl's CRAN page says:
SystemRequirements: libcurl (version 7.14.0 or higher) http://curl.haxx.se. On Linux systems, you will often have to explicitly install libcurl-devel to have the header files and the libcurl library.

Related

cannot install phytools in ubuntu 18.04 with R 3.6

cannot install phytools
tried with devtools
library(devtools)
install_github("liamrevell/phytools")
and
install.packages("phytools")
I keep getting the same error
ERROR: dependency ‘mnormt’ is not available for package ‘phytools’
and I cannot install mnormt because
package ‘mnormt’ is not available (for R version 3.6.3)
gfortran is already installed in my system
GNU Fortran (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
any help is highly appreciated,
thanks
On Ubuntu Linux I cannot get R to update to the latest version (>4.0 at the time of writing), so, like Dirk suggests I have to install an older version of the package, one compatible with the version of R I am running.
My R version is 3.6.3, released feb 2020
I go to the mnormt page and click on "old sources" https://cran.r-project.org/src/contrib/Archive/mnormt/
I see that version 1.5-6 is the most recent release which is prior to my version of R
Following these pages: "Installing older versions of packages" https://support.rstudio.com/hc/en-us/articles/219949047-Installing-older-versions-of-packages I copy the relevant url into this code and run it in R
packageurl <- "https://cran.r-project.org/src/contrib/Archive/mnormt/mnormt_1.5-6.tar.gz"
install.packages(packageurl, repos=NULL, type="source")
Which fixes my problem installing mnormt and also allows packages which depend on it to be installed in the standard way (as far as I tested it)
The current version of mnormt depends on a the current version of R; you chose to remain a version behind.
So just install the previous version of mnormt, for example via
cd /tmp
wget https://cran.r-project.org/src/contrib/Archive/mnormt/mnormt_1.5-7.tar.gz
R CMD INSTALL mnormt_1.5-7.tar.gz
Prefix that last INSTALL command with sudo, or change the permission/group membership of /usr/local/lib/R/site-library, if R tells you it cannot write there.
Once mnormt is installed, proceed with the installation of phytools.
Try to add the tag version to install command, for example: devtools::install_github('cran/mnormt#R-3.0.3')
Check what version you need and replace the tag after the '#'.

R - Installing package with remotes::install_github ask for higher version of the dependencies which BiocManager::install() can not find

I need to install few packages that should be installed with remotes::install_github() like
"acidgenomics/basejump" or "satijalab/seurat".
During the installation, it need to upgrade few other packages version. The BiocManager::install program cannot find those versions and I had to install those dependencies packages version with:
R CMD INSTALL IRanges_2.20.2.tar.gz
Then other packages, that use the same packages stop working. like DESeq2,
I get the error:
Error: package or namespace load failed for ‘DESeq2’:
objects ‘rowSums’, ‘colSums’, ‘rowMeans’, ‘colMeans’ are not exported by 'namespace:S4Vectors'
I found few answers that say it happen (like url)
remotes::install_github() isn't picking up the correct Bioconductor
devel repos, whereas installing with BiocManager::install() does work
as expected.
we have the R 3.6.0 installed as a module and a lot of users uses the same R version. I need all packages to work for everyone.
How can I make all variety packages versions to work?
Finally, I install new version of R 3.6.3 with Bioconductor 3.10 and all the packages install right.

Can't install TTR (tseries) R 3.3.3 (on debian stretch)

I'm unable to install the tseries package into R version 3.3.3 (on Debian debian stretch 4.9.0-6) because of its dependence on TTR. When I run the install, it tries to compile TTR, which leads to the error message
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/moi/R/x86_64-pc-linux-gnu-library/3.3/curl/libs/curl.so':
/usr/lib/x86_64-linux-gnu/libcurl.so.4:version `CURL_OPENSSL_4' not found (required by /home/moi/R/x86_64-pc-linux-gnu-library/3.3/curl/libs/curl.so)
I did try installing a binary version of TTR using
install.packages("TTR", repos="http://R-Forge.R-project.org")
But that yield the error message package ‘TTR’ is not available (for R version 3.3.3)
The problem appears to be related a request for CURL_OPEN_SSL_4 from the R library curl.so. Since I have libcurl.so.4 installed, I don't understand what the problem is.
I'd appreciate any thoughts on how to resolve this.
thanks
I happen to (also) maintain r-cran-ttr for Debian and here is what I have in my Build-Depends in file debian/control:
Build-Depends: debhelper (>= 7.0.0), r-base-dev (>= 3.4.3), cdbs, \
r-cran-xts (>= 0.10-0), r-cran-zoo, r-cran-curl
So it looks like your r-cran-curl package needs re-installing. You may have the libcurl.so as a run-time dependency (from one or more packages, this is commonly used library) but to compile you need the built-time dependency commonly supplied by the matching -dev package.
So maybe try installing sudo apt-get install libcurl4-openssl-dev, then install package curl from CRAN and once that is there, install TTR from CRAN or R-Forge (which is likely a source install anyway).

icudt error while installing stringi library in R

I'm writing this because it took me several days to come to this result.
Bottom line: The stringi library version 1.1.3 (released March 2017) might have issues involving icudt. You can install stringi 1.1.2 using the following commands:
packageurl <- "https://cran.r-project.org/src/contrib/Archive/stringi/stringi_1.1.2.tar.gz"
install.packages(packageurl, repos=NULL, type="source")
I put this together from some RStudio documentation on how to install an older package.
Background:
I was trying to install the forecast library in R. Originally, I was using R 3.1.2. I also installed R 3.3.3 and tried to install stringi it. I'm running CentOS 6.7 and don't have a choice to upgrade.
Forecast failed to install due to issues installing stringi. The stringi library failed to install due to errors downloading ICU data library (icudt)
It looks like stringi 1.1.3 added download/build logic regarding icudt, and upcoming version 1.1.4 has corrections to this logic (as of date 2017-04-02).
I went to the ICU project site: and downloaded/installed the ICU library that appeared to be specified in the error messages below:
checking whether we may compile src/icu55/common/umapfile.c... yes
checking whether we may compile src/icu55/common/putil.cpp... yes
checking whether we can fetch icudt... WARNING: ignoring environment value of R_HOME
downloading ICU data library (icudt)
output path: icu55/data/icudt55l.zip
Error in stri_download_icudt("icu55/data") :
could not find function "dir.exists"
Calls: identical -> stri_download_icudt
Execution halted
*** icudt could not be downloaded. stopping.
ERROR: configuration failed for package ‘stringi’
Searches online for icu55, icudt55l.zip, or any procedure that followed to get past this error didn't turn up a procedure that worked. I downloaded, built, and installed ICU 55.1 and also ICU 58.2. I also updated gcc and g++. The CRAN repository install notes for stringi 1.1.3 don't currently give a straightforward set of instructions to successfully install stringi when I have a working internet connection.
I started by asking this as a question and then found my answer. I'll post it anyways. I had added several links but needed to remove them because I don't have enough cred to get away with them.
This has nothing to do with ICU. This is a bug in stringi, which I have already fixed in version 1.1.5 (now on CRAN). The dir.exists() function is specific to R ≥ 3.2.0 - I wasn't aware of that. Sorry for inconvenience.
The stringi library version 1.1.3 (released March 2017) might have issues involving icudt. You can install stringi 1.1.2 using the following commands:
packageurl <- "https://cran.r-project.org/src/contrib/Archive/stringi/stringi_1.1.2.tar.gz"
install.packages(packageurl, repos=NULL, type="source")

Unable to install ggplot2 on Ubuntu 11.10

I am getting the following error when trying to install ggplot2:
> install.packages("ggplot2")
Installing package(s) into ‘/home/dodo/R/x86_64-pc-linux-gnu-library/2.13’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
Loading Tcl/Tk interface ... done
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘ggplot2’ is not available (for R version 2.13.1)
I am running Ubuntu 11.10 (oneiric).
Any help is appreciated.
You need R (>= 2.14.0) for this version.
So please go and see the instructions at CRAN to upgrade on Ubuntu to the current R and once you have R 2.14.2 up and running (which is a matter of four or five commands, thanks to the magic of apt-get and friends, upgrade to the current ggplot2.
ggplot2-0.9.0 has an explicit dependency on R >= 2.14 (and an implicit one of R >= 2.14.1). Thus it can not be installed in R version 2.13.1. Perhaps you can get the previous version (0.8.9) from the archives and install that.
You need to install a version that is appropriate to your old version of R or you need to upgrade. To go the first route, you should find a version of ggplot2 in the Archives and then install from source (which is I believe the default for Linux). Perhaps try the UCLA CRAN mirror:
http://cran.stat.ucla.edu/src/contrib/Archive/ggplot2/ggplot2_0.8.9.tar.gz

Resources