Trouble downloading {data.table} package - r

I initially downloaded the data.table package from CRAN using:
install.packages()
It downloaded version 1.9.4, after hitting a few speed bumps and going through this website I figured I had to download the latest version from github. In order to do that I tried to download to "devtools" but I was unsuccessful. Following is the error I got:
* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcurl' found
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcurl' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lcurl
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libcurl was not found. Try installing:
* deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
* rpm: libcurl-devel (Fedora, CentOS, RHEL)
* csw: libcurl_dev (Solaris)
If libcurl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libcurl.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
ERROR: configuration failed for package ‘curl’
* removing ‘/home/trader/R/x86_64-pc-linux-gnu-library/3.2/curl’
Warning in install.packages :
installation of package ‘curl’ had non-zero exit status
* installing *source* package ‘RCurl’ ...
** package ‘RCurl’ successfully unpacked and MD5 sums checked
checking for curl-config... no
Cannot find curl-config
ERROR: configuration failed for package ‘RCurl’
* removing ‘/home/trader/R/x86_64-pc-linux-gnu-library/3.2/RCurl’
Warning in install.packages :
installation of package ‘RCurl’ had non-zero exit status
ERROR: dependency ‘curl’ is not available for package ‘httr’
* removing ‘/home/trader/R/x86_64-pc-linux-gnu-library/3.2/httr’
Warning in install.packages :
installation of package ‘httr’ had non-zero exit status
ERROR: dependency ‘curl’ is not available for package ‘rversions’
* removing ‘/home/trader/R/x86_64-pc-linux-gnu-library/3.2/rversions’
Warning in install.packages :
installation of package ‘rversions’ had non-zero exit status
ERROR: dependencies ‘httr’, ‘RCurl’, ‘rversions’ are not available for package ‘devtools’
* removing ‘/home/trader/R/x86_64-pc-linux-gnu-library/3.2/devtools’
Warning in install.packages :
installation of package ‘devtools’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpMtxhRg/downloaded_packages’
So I tried another approach and downloaded the .tar.gz file from https://cran.r-project.org/web/packages/data.table/index.html.
Then using:
> install.packages("~/Downloads/data.table_1.9.6.tar.gz", repos = NULL, type = "source")
The download was successful but I got the following error when trying to load it:
> library("data.table", lib.loc="~/R/x86_64-pc-linux-gnu-library/3.2")
data.table 1.9.6 For help type ?data.table or https://github.com/Rdatatable/data.table/wiki
The fastest way to learn (by data.table authors): https://www.datacamp.com/courses/data-analysis-the-data-table-way
Attaching package: ‘data.table’
The following object is masked from ‘package:xts’:
last
Error in fetch(key) :
lazy-load database '/home/trader/R/x86_64-pc-linux-gnu-library/3.2/data.table/help/data.table.rdb' is corrupt
In addition: Warning message:
In fetch(key) : internal error -3 in R_decompress1
My session info is as follows:
> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu precise (12.04.5 LTS)
locale:
[1] LC_CTYPE=en_IN.UTF-8 LC_NUMERIC=C LC_TIME=en_IN.UTF-8 LC_COLLATE=en_IN.UTF-8 LC_MONETARY=en_IN.UTF-8 LC_MESSAGES=en_IN.UTF-8
[7] LC_PAPER=en_IN.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_IN.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] data.table_1.9.6 plyr_1.8.3 git2r_0.11.0 ISLR_1.0 bigtabulate_1.1.2 biglm_0.9-1 DBI_0.3.1 biganalytics_1.1.1
[9] bigmemory_4.4.6 BH_1.58.0-1 bigmemory.sri_0.1.3 highfrequency_0.4 xts_0.9-7 zoo_1.7-12
loaded via a namespace (and not attached):
[1] Rcpp_0.12.0 lattice_0.20-33 chron_2.3-47 grid_3.2.2 magrittr_1.5 stringi_1.0-1 reshape2_1.4.1 tools_3.2.2 stringr_1.0.0
I am not sure what I am supposed to do now. Can someone please help?

Looks like corrupted installation.
Close all sessions
Start single clean R session in console (to exclude any IDE issues)
Install development version from github repository directly using:
install.packages("data.table", repos = "https://Rdatatable.github.io/data.table")
After installation you can optionally verify all test by
library(data.table)
test.data.table()
If you want to install latest CRAN release just skip repos argument to install.packages.

Related

Cannot install R packages on new Ubuntu Device

I am a medical doctor (so no computer science background at all) starting to get involved with bioinformatic analyses of big datasets and have used R on my private Windows laptop in the past without any problems.
My department now bought a new powerful Laptop to speed up the analyses and our bioinformatics core facility recommended using a Linux system (which I have never really used before), so now I have this great Ubuntu laptop but I'm getting a little frustrated with just setting up my R environment to start working. I've heard Linux needs some time to get used to and I'm up for the challenge and want to try to understand what I'm doing.
So the problem I have is that I cannot really install certain packages in R. As I said the laptop is brand new and installing R and RStudio was one of the first things I did without changing anything in the basic settings of the laptop. So I was very surprised that I keep getting errors in something as simple as installing those packages. For some reason some packages like
install.packages("tidyverse")
work fine, while others fail. So
install.packages("devtools")
gives me the following output
Installing package into ‘/home/jasper/R/x86_64-pc-linux-gnu-library/4.2’
(as ‘lib’ is unspecified)
also installing the dependencies ‘systemfonts’, ‘textshaping’, ‘ragg’, ‘pkgdown’
trying URL 'https://cloud.r-project.org/src/contrib/systemfonts_1.0.4.tar.gz'
Content type 'application/x-gzip' length 81757 bytes (79 KB)
==================================================
downloaded 79 KB
trying URL 'https://cloud.r-project.org/src/contrib/textshaping_0.3.6.tar.gz'
Content type 'application/x-gzip' length 35722 bytes (34 KB)
==================================================
downloaded 34 KB
trying URL 'https://cloud.r-project.org/src/contrib/ragg_1.2.4.tar.gz'
Content type 'application/x-gzip' length 427579 bytes (417 KB)
==================================================
downloaded 417 KB
trying URL 'https://cloud.r-project.org/src/contrib/pkgdown_2.0.7.tar.gz'
Content type 'application/x-gzip' length 871465 bytes (851 KB)
==================================================
downloaded 851 KB
trying URL 'https://cloud.r-project.org/src/contrib/devtools_2.4.5.tar.gz'
Content type 'application/x-gzip' length 374718 bytes (365 KB)
==================================================
downloaded 365 KB
* installing *source* package ‘systemfonts’ ...
** package ‘systemfonts’ successfully unpacked and MD5 sums checked
** using staged installation
Package fontconfig was not found in the pkg-config search path.
Perhaps you should add the directory containing `fontconfig.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fontconfig' found
Package freetype2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `freetype2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'freetype2' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lfontconfig -lfreetype
--------------------------- [ANTICONF] --------------------------------
Configuration failed to find the fontconfig freetype2 library. Try installing:
* deb: libfontconfig1-dev (Debian, Ubuntu, etc)
* rpm: fontconfig-devel (Fedora, EPEL)
* csw: fontconfig_dev (Solaris)
* brew: freetype (OSX)
If fontconfig freetype2 is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a fontconfig freetype2.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
-------------------------- [ERROR MESSAGE] ---------------------------
<stdin>:1:10: fatal error: fontconfig/fontconfig.h: No such file or directory
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘systemfonts’
* removing ‘/home/jasper/R/x86_64-pc-linux-gnu-library/4.2/systemfonts’
Warning in install.packages :
installation of package ‘systemfonts’ had non-zero exit status
ERROR: dependency ‘systemfonts’ is not available for package ‘textshaping’
* removing ‘/home/jasper/R/x86_64-pc-linux-gnu-library/4.2/textshaping’
Warning in install.packages :
installation of package ‘textshaping’ had non-zero exit status
ERROR: dependencies ‘systemfonts’, ‘textshaping’ are not available for package ‘ragg’
* removing ‘/home/jasper/R/x86_64-pc-linux-gnu-library/4.2/ragg’
Warning in install.packages :
installation of package ‘ragg’ had non-zero exit status
ERROR: dependency ‘ragg’ is not available for package ‘pkgdown’
* removing ‘/home/jasper/R/x86_64-pc-linux-gnu-library/4.2/pkgdown’
Warning in install.packages :
installation of package ‘pkgdown’ had non-zero exit status
ERROR: dependency ‘pkgdown’ is not available for package ‘devtools’
* removing ‘/home/jasper/R/x86_64-pc-linux-gnu-library/4.2/devtools’
Warning in install.packages :
installation of package ‘devtools’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpZcPwU9/downloaded_packages’
After looking online for a couple of days now, I believe that there is a problem with the directories or access to them. When I enter
.libPaths()
in R, it gives me
[1] "/home/jasper/R/x86_64-pc-linux-gnu-library/4.2" "/usr/local/lib/R/site-library"
[3] "/usr/lib/R/site-library" "/usr/lib/R/library"
So I started looking into this and tried to modify R_LIBS_USER part of the Renviron file as described here (How do I change the default library path for R packages) without any success.
When I tried installing another package, I got the message that the path is not writable and I read this might be a permission problem. So I used used chmod -R 777 on the four directories (which as far as I understood gives me all permissions to these folders) that showed up with .libPaths(), but no success either. Repeated reinstallation of R and RStudio did not help either.
Unfortunately my computer science skills quickly find their limit (even working with the terminal to be honest). Since I honestly do not really understand what I am doing and would like to do so while changing files in the root of this new laptop, I am hoping that you can help me out. Quitting and changing back to Windows is not an option for my ego :D .
Here is my sessionInfo():
R version 4.2.2 Patched (2022-11-10 r83330)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.5 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=de_DE.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=de_DE.UTF-8
[6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=de_DE.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.2.2 fastmap_1.1.0 cli_3.4.1 htmltools_0.5.4 tools_4.2.2 rstudioapi_0.14 yaml_2.3.6 rmarkdown_2.19
[9] knitr_1.41 xfun_0.35 digest_0.6.31 rlang_1.0.6 evaluate_0.19
I would really appreciate your help!
Thanks a lot,
Jasper
I had this same problem recently when trying to install devtools on a kali linux virtual box.
The way I got around it was to install dev tool directly from the linux command line (terminal) using:
sudo apt-get install r-cran-devtools
This should work on Ubuntu too. Good luck.

Problem in the installation of R package rsvg

I'm trying to install r package rsvg without any success. Tried the following two methods:
1. install.packages("rsvg")
install.packages("rsvg")
Installing package into ‘C:/Users/hp/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is
later:
binary source needs_compilation
rsvg 2.3.1 2.3.2 TRUE
installing the source package ‘rsvg’
trying URL 'https://cloud.r-project.org/src/contrib/rsvg_2.3.2.tar.gz'
Content type 'application/x-gzip' length 183798 bytes (179 KB)
downloaded 179 KB
* installing *source* package 'rsvg' ...
** package 'rsvg' successfully unpacked and MD5 sums checked
** using staged installation
** libs
rm -f rsvg.dll rsvg.o
"C:/PROGRA~1/R/R-42~1.1/bin/x64/Rscript.exe" "../tools/winlibs.R" 2.48.8
Error in download.file(sprintf("https://github.com/rwinlib/rsvg/archive/v%s.zip", :
download from 'https://github.com/rwinlib/rsvg/archive/v2.48.8.zip' failed
In addition: Warning message:
In download.file(sprintf("https://github.com/rwinlib/rsvg/archive/v%s.zip", :
URL 'https://codeload.github.com/rwinlib/rsvg/zip/refs/tags/v2.48.8': Timeout of 60 seconds was reached
Execution halted
make: *** [Makevars.win:7: winlibs] Error 1
ERROR: compilation failed for package 'rsvg'
* removing 'C:/Users/hp/AppData/Local/R/win-library/4.2/rsvg'
The downloaded source packages are in
‘C:\Users\hp\AppData\Local\Temp\RtmpmG8xM2\downloaded_packages’
Warning message:
In install.packages("rsvg") :
installation of package ‘rsvg’ had non-zero exit status
2. remotes::install_github("ropensci/rsvg")
library(remotes)
install_github("ropensci/rsvg")
Downloading GitHub repo ropensci/rsvg#HEAD
✔ checking for file 'C:\Users\hp\AppData\Local\Temp\RtmpmG8xM2\remotes5a645f9057ed\ropensci-rsvg-6d9840f/DESCRIPTION'
─ preparing 'rsvg':
checking DESCRIPTION meta-information ...
checking DESCRIPTION meta-information ...
✔ checking DESCRIPTION meta-information
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building 'rsvg_2.3.2.tar.gz'
Warning:
Warning: file 'rsvg/cleanup' did not have execute permissions: corrected
Warning: file 'rsvg/configure' did not have execute permissions: corrected
Installing package into ‘C:/Users/hp/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
* installing *source* package 'rsvg' ...
** using staged installation
** libs
rm -f rsvg.dll rsvg.o
"C:/PROGRA~1/R/R-42~1.1/bin/x64/Rscript.exe" "../tools/winlibs.R" 2.48.8
Error in download.file(sprintf("https://github.com/rwinlib/rsvg/archive/v%s.zip", :
download from 'https://github.com/rwinlib/rsvg/archive/v2.48.8.zip' failed
In addition: Warning messages:
1: In download.file(sprintf("https://github.com/rwinlib/rsvg/archive/v%s.zip", :
downloaded length 35551249 != reported length 43111940
2: In download.file(sprintf("https://github.com/rwinlib/rsvg/archive/v%s.zip", :
URL 'https://codeload.github.com/rwinlib/rsvg/zip/refs/tags/v2.48.8': Timeout of 60 seconds was reached
Execution halted
make: *** [Makevars.win:7: winlibs] Error 1
ERROR: compilation failed for package 'rsvg'
* removing 'C:/Users/hp/AppData/Local/R/win-library/4.2/rsvg'
Warning message:
In i.p(...) :
installation of package ‘C:/Users/hp/AppData/Local/Temp/RtmpmG8xM2/file5a645596780/rsvg_2.3.2.tar.gz’ had non-zero exit status
sessionInfo()
sessionInfo()
R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22000)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C LC_TIME=English_United States.utf8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] remotes_2.4.2
loaded via a namespace (and not attached):
[1] processx_3.8.0 compiler_4.2.1 R6_2.5.1 rprojroot_2.0.3 cli_3.4.1 prettyunits_1.1.1 tools_4.2.1 withr_2.5.0
[9] curl_4.3.3 crayon_1.5.2 callr_3.7.2 ps_1.7.2 pkgbuild_1.3.1
According to this issue, you should first install pkgconfig like this:
install.packages('pkgconfig')
install.packages('rsvg')
library(rsvg)
#> Linking to librsvg 2.48.4
Created on 2022-10-28 with reprex v2.0.2
It looks like you experience some connection issues when installing the required winlib. You could also try to install this first:
remotes::install_github("rwinlib/rsvg")
EDIT: Same suggestion as the comment by #Limey

Can the R package readODS be improved, as it gives errors on Linux during installation

In the process of getting acquainted with R, I found another topic from 7 years ago with the suggestion to use the readODS package. However, when I tried to install readODS using R-Studio 1.3.1093 with R 4.0.3 on Fedora Linux 32, the install failed with a list of errors. I've omitted the output of the start of the installation. And FYI: gnumeric is installed.
<start of output omitted....>
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace ‘rlang’ 0.4.9 is being loaded, but >= 0.4.10 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘lifecycle’
* removing ‘/home/huub/R/x86_64-redhat-linux-gnu-library/4.0/lifecycle’
Warning in install.packages :
installation of package ‘lifecycle’ had non-zero exit status
ERROR: dependency ‘ellipsis’ is not available for package ‘vctrs’
* removing ‘/home/huub/R/x86_64-redhat-linux-gnu-library/4.0/vctrs’
Warning in install.packages :
installation of package ‘vctrs’ had non-zero exit status
ERROR: dependencies ‘ellipsis’, ‘fansi’, ‘lifecycle’, ‘utf8’, ‘vctrs’ are not available for package ‘pillar’
* removing ‘/home/huub/R/x86_64-redhat-linux-gnu-library/4.0/pillar’
Warning in install.packages :
installation of package ‘pillar’ had non-zero exit status
ERROR: dependencies ‘ellipsis’, ‘lifecycle’, ‘vctrs’ are not available for package ‘hms’
* removing ‘/home/huub/R/x86_64-redhat-linux-gnu-library/4.0/hms’
Warning in install.packages :
installation of package ‘hms’ had non-zero exit status
ERROR: dependencies ‘ellipsis’, ‘fansi’, ‘lifecycle’, ‘pillar’, ‘vctrs’ are not available for package ‘tibble’
* removing ‘/home/huub/R/x86_64-redhat-linux-gnu-library/4.0/tibble’
Warning in install.packages :
installation of package ‘tibble’ had non-zero exit status
ERROR: dependency ‘tibble’ is not available for package ‘cellranger’
* removing ‘/home/huub/R/x86_64-redhat-linux-gnu-library/4.0/cellranger’
Warning in install.packages :
installation of package ‘cellranger’ had non-zero exit status
ERROR: dependencies ‘hms’, ‘tibble’, ‘lifecycle’ are not available for package ‘readr’
* removing ‘/home/huub/R/x86_64-redhat-linux-gnu-library/4.0/readr’
Warning in install.packages :
installation of package ‘readr’ had non-zero exit status
ERROR: dependencies ‘xml2’, ‘cellranger’, ‘readr’ are not available for package ‘readODS’
* removing ‘/home/huub/R/x86_64-redhat-linux-gnu-library/4.0/readODS’
Warning in install.packages :
installation of package ‘readODS’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpaKyR2b/downloaded_packages’
So I'd say, there's something to fix for this readODS package. Which is too bad, since I use LibreOffice (.ods) on a daily basis.
> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Fedora 32 (Thirty Two)
Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblas-r0.3.12.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.0.3 tools_4.0.3

How do I install a compatible version of devtools to R 3.5.1?

Goal
I would like to install devtools to my version of R version 3.5.1.
Problem
When I install the package devtools, I get the following error:
here are binary versions available but the source versions are later:
binary source needs_compilation
processx 3.4.2 3.4.5 TRUE
callr 3.4.3 3.5.1 FALSE
covr 3.5.0 3.5.1 TRUE
ellipsis 0.3.0 0.3.1 TRUE
jsonlite 1.6.1 1.7.2 TRUE
pkgbuild 1.0.6 1.2.0 FALSE
pkgload 1.0.2 1.1.0 TRUE
rlang 0.4.5 0.4.10 TRUE
roxygen2 7.1.0 7.1.1 TRUE
devtools 2.3.0 2.3.2 FALSE
....
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'processx' 3.4.2 is being loaded, but >= 3.4.4 is required
ERROR: lazy loading failed for package 'callr'
* removing 'C:/Users/User/AppData/Local/R/win-library/3.5/callr'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘callr’ had non-zero exit status
ERROR: dependency 'callr' is not available for package 'pkgbuild'
* removing 'C:/Users/User/AppData/Local/R/win-library/3.5/pkgbuild'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘pkgbuild’ had non-zero exit status
ERROR: dependencies 'callr', 'pkgbuild' are not available for package 'devtools'
* removing 'C:/Users/User/AppData/Local/R/win-library/3.5/devtools'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘devtools’ had non-zero exit status
Attempted Solution
I tried to install processx 3.4.2 directly by downloading the package into my library from https://github.com/r-lib/processx/releases/tag/v3.4.2.
install.packages(paste0(folder, "processx-3.4.2.tar.gz"), repos = NULL)
Yet, I got the following error message:
Warning in untar2(tarfile, files, list, exdir, restore_times) :
failed to copy 'processx-3.4.2/inst/CODE_OF_CONDUCT.md' to 'processx-3.4.2/CODE_OF_CONDUCT.md'
Warning in untar2(tarfile, files, list, exdir, restore_times) :
skipping pax global extended headers
* installing *source* package 'processx' ...
** libs
*** arch - i386
Warning in system(cmd) : 'make' not found
ERROR: compilation failed for package 'processx'
* removing 'C:/Users/User/AppData/Local/R/win-library/3.5/processx'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘C:/Users/User/AppData/Local/R/win-library/3.5/processx-3.4.2.tar.gz’ had non-zero exit status
Your simplest fix is to either:
Install a newer version of R (!!recommended!!)
Use a snapshot mirror such as the ones from provided by microsoft at https://mran.microsoft.com/snapshots/{date} (replacing {date}) as the mirror argument in install.packages. By looking at https://cran.r-project.org/bin/windows/base/old/ we can see that R-3.5.1 was replaced by R-3.5.2 in december 2018. So I would suggest using 2018-11-31 as your snapshot mirror.
install.packages('devtools', mirror = 'https://mran.microsoft.com/snapshots/2018-11-31')
Some installed packages might "screw up the installation" (too recent versions?) so if the installation or some code fails after installation, I would suggest using renv and R projects (in Rstudio). This would ensure all packages are installed in a fresh environment and that there should be no version conflict (as they will all be installed from the specific snapshot). Reading introduction guides for renv and the Rstudio support for projects can help with this (in case you observe further problems).
It might also be sufficient to uninstall the packages (but it might break some other dependencies).

Error in library(qdap) : there is no package called ‘qdap’

I've installed qdap:
install.packages("qdap")
It takes a while to donwload everything but the console fills up with all the downloads and at the end I get a message like this:
Warning in install.packages :
installation of package ‘qdap’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpeTzuKz/downloaded_packages’
> library(qdap)
Error in library(qdap) : there is no package called ‘qdap’
>
This SO post led me to try adding dependencies = TRUE but the issue remains.
Here's session info
sessionInfo():
> sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.2 LTS
Matrix products: default
BLAS: /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.18.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.0 tools_3.4.0
Another post I found yesterday (cannot find it again now with a Google search) suggested I remove existing qdap files within my library directory, close my session, restart and fresh install. There was no package exactly called qdap but some with qdap in the name which I removed. My issue remained, I am unable to install qdap.
I'm not sure what other information to provide? Any help appreciated.
Here are the errors generated when attempting to install qdap:
./configure: line 3736: /usr/lib/jvm/default-java/jre/bin/java: No
such file or directory no configure: error: Java interpreter
'/usr/lib/jvm/default-java/jre/bin/java' does not work ERROR:
configuration failed for package ‘rJava’
* removing ‘/home/myname/R/x86_64-pc-linux-gnu-library/3.4/rJava’ Warning in install.packages : installation of package ‘rJava’ had
non-zero exit status ERROR: dependency ‘rJava’ is not available for
package ‘openNLPdata’
* removing ‘/home/myname/R/x86_64-pc-linux-gnu-library/3.4/openNLPdata’ Warning
in install.packages : installation of package ‘openNLPdata’ had
non-zero exit status ERROR: dependency ‘rJava’ is not available for
package ‘xlsxjars’
* removing ‘/home/myname/R/x86_64-pc-linux-gnu-library/3.4/xlsxjars’ Warning in install.packages : installation of package ‘xlsxjars’ had
non-zero exit status ERROR: dependency ‘rJava’ is not available for
package ‘venneuler’
* removing ‘/home/myname/R/x86_64-pc-linux-gnu-library/3.4/venneuler’ Warning
in install.packages : installation of package ‘venneuler’ had
non-zero exit status ERROR: dependencies ‘openNLPdata’, ‘rJava’ are
not available for package ‘openNLP’
* removing ‘/home/myname/R/x86_64-pc-linux-gnu-library/3.4/openNLP’ Warning in install.packages : installation of package ‘openNLP’ had
non-zero exit status ERROR: dependencies ‘rJava’, ‘xlsxjars’ are not
available for package ‘xlsx’
* removing ‘/home/myname/R/x86_64-pc-linux-gnu-library/3.4/xlsx’ Warning in install.packages : installation of package ‘xlsx’ had
non-zero exit status ERROR: dependencies ‘openNLP’, ‘venneuler’,
‘xlsx’ are not available for package ‘qdap’
* removing ‘/home/myname/R/x86_64-pc-linux-gnu-library/3.4/qdap’ Warning in install.packages : installation of package ‘qdap’ had
non-zero exit status
Since this looks like a rJava issue I found this post and tried the top voted answer in the terminal:
apt-get install r-cran-rjava
Resulted in:
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
I'm hoping theres a way around this without being a root user? I'm not as familiar with linux. I'm able to install other p packages.
There is a solution for this issue when you have no root access.
Download Java (make sure to install JDK) and install it inside your $HOME
You can do that as Oracle's Java is just a tar.gz package
Make sure to set JAVA_HOME
export JAVA_HOME=$HOME/opt/my_jdk_installation
Once you have Java you have to reconfigure R
Simply tell R where your Java is
R CMD javareconf \
JAVA_HOME=${JAVA_HOME} \
JAVA=${JAVA_HOME}/bin/java \
JAVAC=${JAVA_HOME}/bin/javac \
JAVAH=${JAVA_HOME}/bin/javah \
JAR=${JAVA_HOME}/bin/jar \
JAVA_LD_LIBRARY_PATH=${JAVA_HOME}/jre/lib/server \
JAVA_CPPFLAGS="-I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux"
Since now, R should use your personal installation of Java. This way, you don't depend on sys admin.

Resources