Problem in the installation of R package rsvg - r

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

Related

error using the 'digest' package in R

I recently had some problems installing and using the package "digest" in R-3.4.3, which I used previously in R-3.4.1 with no problem. Below are the messages I received from R.
install.packages("digest", dependencies = TRUE)
trying URL 'https://mirror.aarnet.edu.au/pub/CRAN/bin/windows/contrib/3.4/digest_0.6.15.zip'
Content type 'application/zip' length 175238 bytes (171 KB)
downloaded 171 KB
package ‘digest’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\weizha\AppData\Local\Temp\RtmpwhNFrq\downloaded_packages
library(digest)
Error: package or namespace load failed for ‘digest’ in FUN(X[[i]], ...):
no such symbol digest in package E:/R 3.4.3/library/digest/libs/x64/digest.dll
Previously I used install.packages(devtools) in R-3.4.1 which installs "digest" as well, and it all worked fine. Recently work upgraded our operating system to windows 10 (from 7) and installed R-3.4.3 for us, and I couldn't get devtools to work anymore, I figured out it's because digest is not working as has been shown above. I've read everything I can find online, but I have no clue how to fix this.
> .libPaths()
[1] "E:/R-3.4.3/library"
> install.packages("digest", lib="E:/R-3.4.3/library")
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://cran.csiro.au/bin/windows/contrib/3.4/digest_0.6.15.zip'
Content type 'application/zip' length 175238 bytes (171 KB)
downloaded 171 KB
package ‘digest’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\weizha\AppData\Local\Temp\RtmpCQY8o1\downloaded_packages
> library(digest)
Error: package or namespace load failed for ‘digest’ in FUN(X[[i]], ...):
no such symbol digest in package E:/R-3.4.3/library/digest/libs/x64/digest.dll
> library("digest", lib.loc="E:/R-3.4.3/library")
Error: package or namespace load failed for ‘digest’ in FUN(X[[i]], ...):
no such symbol digest in package E:/R-3.4.3/library/digest/libs/x64/digest.dll
> sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 14393)
Matrix products: default
locale:
[1] LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252
[3] LC_MONETARY=English_Australia.1252 LC_NUMERIC=C
[5] LC_TIME=English_Australia.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.3 tools_3.4.3
>
> setwd('E:/R-3.4.3')
> install.packages("digest", type="source")
trying URL 'https://cran.csiro.au/src/contrib/digest_0.6.15.tar.gz'
Content type 'application/x-gzip' length 122095 bytes (119 KB)
downloaded 119 KB
* installing *source* package 'digest' ...
** package 'digest' successfully unpacked and MD5 sums checked
** libs
Warning: running command 'make -f "E:/R-34~1.3/etc/x64/Makeconf" -f "E:/R-34~1.3/share/make/winshlib.mk" SHLIB="digest.dll" WIN=64 TCLBIN=64 OBJECTS="aes.o crc32.o digest.o init.o md5.o pmurhash.o raes.o sha1.o sha2.o sha256.o xxhash.o"' had status 127
ERROR: compilation failed for package 'digest'
* removing 'E:/R-3.4.3/library/digest'
In R CMD INSTALL
The downloaded source packages are in
‘C:\Users\weizha\AppData\Local\Temp\RtmpCQY8o1\downloaded_packages’
Warning messages:
1: running command '"E:/R-3.4.3/bin/x64/R" CMD INSTALL -l "E:\R-3.4.3\library" C:\Users\weizha\AppData\Local\Temp\RtmpCQY8o1/downloaded_packages/digest_0.6.15.tar.gz' had status 1
2: In install.packages("digest", type = "source") :
installation of package ‘digest’ had non-zero exit status
> .libPaths()
[1] "E:/R-3.4.3/library"
> install.packages("digest", type="binary")
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://cran.csiro.au/bin/windows/contrib/3.4/digest_0.6.15.zip'
Content type 'application/zip' length 175238 bytes (171 KB)
downloaded 171 KB
package ‘digest’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\weizha\AppData\Local\Temp\Rtmp0UupHr\downloaded_packages
> library(digest)
Error: package or namespace load failed for ‘digest’ in FUN(X[[i]], ...):
no such symbol digest in package E:/R-3.4.3/library/digest/libs/x64/digest.dll
When I manually download the package from CRAN, this is what I received from R
> .libPaths()
[1] "E:/R-3.4.3/library"
> library(digest)
Error: package ‘digest’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
In addition: Warning message:
package ‘digest’ was built under R version 3.5.0
>

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.

RMongo installation fails with Segmentation Fault in Ubuntu

I've been for last couple of hours trying to install the RMongo package with the following output:
> install.packages("RMongo")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://repo.bppt.go.id/cran/src/contrib/RMongo_0.0.25.tar.gz'
Content type 'application/x-gzip' length 4169519 bytes (4.0 MB)
==================================================
downloaded 4.0 MB
* installing *source* package ‘RMongo’ ...
** package ‘RMongo’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Segmentation fault (core dumped)
ERROR: loading failed
* removing ‘/usr/local/lib/R/site-library/RMongo’
The downloaded source packages are in
‘/tmp/RtmpHZoomn/downloaded_packages’
Warning message:
In install.packages("RMongo") :
installation of package ‘RMongo’ had non-zero exit status
I've also identified the same error trying to install xlsx.
I don't know what has changed in the past distros, since I've tried this with Ubuntu 16.04.2 and Ubuntu 17.04, with the same result.
This is a description of the R environment in the Ubuntu 16.04.2 distro:
> 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/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=es_ES.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=es_ES.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=es_ES.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=es_ES.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 tcltk_3.4.0
Any idea about what can be happening?
linux-image-3.13.0-121-generic and linux-image-4.4.0-81-generic contain a fix for the Stack Clash vulnerability.
Be careful with kernel updates, which fix this vulnerability. Current patch breaks many java (sun/oracle and openjdk) applications. See Bug #1699772: linux-image-4.4.0-81-generic, linux-image-3.13.0-121-generic Regression: many user-space apps crashing. The solution is to temporary reboot system with old kernel (linux-image-3.13.0-119-generic in Trusty).
Ubuntu kernel developers will prepare new patch in a few days.
UPDATE: Latest updates (at least image-4.4.0-83-generic, linux-image-4.8.0-58-generic, linux-image-4.10.0-26-generic) fix this vulnerability and problems with user-space programs.
This doesn't answer to the problems that I'm experiencing with RMongo, but solves the problem for me, so I hope it can be useful.
I've continued making some tests. Since this problem started when RMongo suddenly stopped from working, and taking into account that I had a similar installation that was working properly, I started to compare both environments.
I've checked that, in the system that is failing, some software updates were performed (you can check them below):
The following NEW packages will be installed
libmircommon7 libmircore1 linux-headers-4.4.0-81 linux-headers-4.4.0-81-generic linux-image-4.4.0-81-generic
linux-image-extra-4.4.0-81-generic
The following packages will be upgraded:
click firefox firefox-locale-en flashplugin-installer gir1.2-click-0.4 google-chrome-stable grub-common grub-pc
grub-pc-bin grub2-common libc-bin libc-dev-bin libc6 libc6:i386 libc6-dbg libc6-dev libclick-0.4-0 libepoxy0
libgnutls-openssl27 libgnutls30 libmirclient9 libmircookie2 libmirprotobuf3 libmwaw-0.3-3 libnss3 libnss3-nssdb
libqt5concurrent5 libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5opengl5 libqt5printsupport5 libqt5sql5
libqt5sql5-sqlite libqt5test5 libqt5widgets5 libqt5xml5 libssl-dev libssl-doc libssl1.0.0 libvlc5 libvlccore8
libzzip-0-13 linux-firmware linux-headers-generic linux-image-generic linux-libc-dev locales multiarch-support
openssl python3-click-package vlc vlc-data vlc-nox vlc-plugin-notify vlc-plugin-samba
So, I've checked one by one this packages, and it turns out that the root of the problem is the new kernel 4.4.0-81.
In order to be sure that this is the root of the problem, I've launched by Ubuntu distro with the previous version of the kernel that I had in my laptop: 4.4.0-79
And this is the result of the installation:
> install.packages("RMongo")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://pbil.univ-lyon1.fr/CRAN/src/contrib/RMongo_0.0.25.tar.gz'
Content type 'application/x-gzip' length 4169519 bytes (4.0 MB)
==================================================
downloaded 4.0 MB
* installing *source* package ‘RMongo’ ...
** package ‘RMongo’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (RMongo)
The downloaded source packages are in
‘/tmp/RtmpJScKfz/downloaded_packages’
> install.packages("xlsx")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://pbil.univ-lyon1.fr/CRAN/src/contrib/xlsx_0.5.7.tar.gz'
Content type 'application/x-gzip' length 312839 bytes (305 KB)
==================================================
downloaded 305 KB
* installing *source* package ‘xlsx’ ...
** package ‘xlsx’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (xlsx)
The downloaded source packages are in
‘/tmp/RtmpJScKfz/downloaded_packages’
Both packages, xlsx and RMongo, are now successfully installed and working.
I've also checked the relationship between xlsx and RMongo, and I'm afraid that problem underneath is rJava (common dependency). As a matter of fact, in order to be sure about this, I've made tests with other packages rJava-dependant (RWeka) and I had the same problem, solved after changing the kernel version.
== UPDATE ==
After the last kernel update, from 4.4.0-81 to 4.4.0-83, the problem has been fixed.
Same problem (at least for package "xlsx") occurs in Ubuntu 14.04 LTS with kernel 3.13.0-121-generic. When booting with the previous kernel (3.13.0-119-generic) installation works and library loads.
UPDATE: problem appears to be solved in Ubuntu 14.04 LTS by new kernel 3.13.0-123-generic

Trouble downloading {data.table} package

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.

Error installing R package atSNP

I am trying to install an R package atSNP from https://github.com/chandlerzuo/atSNP. According to the documentation, this is how it is installed:
> library(devtools)
> install_github("chandlerzuo/atSNP")
But I get the following error:
Downloading github repo chandlerzuo/atSNP#master
Installing atSNP
Skipping 2 packages not available: GenomicRanges, motifStack
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ --no-save --no-restore CMD INSTALL \
'/private/var/folders/vt/nnrr0hts2h1bk6stsg4mt2xw0000gn/T/Rtmpzjo43z/devtoolsd9a33b03bdb4/chandlerzuo-atSNP-8cbe50e' \
--library='/Library/Frameworks/R.framework/Versions/3.2/Resources/library' --install-tests
* installing *source* package ‘atSNP’ ...
** libs
make: Nothing to be done for `all'.
installing to /Library/Frameworks/R.framework/Versions/3.2/Resources/library/atSNP/libs
** R
** data
** tests
** preparing package for lazy loading
No methods found in "IRanges" for requests: sapply
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
No methods found in "IRanges" for requests: sapply
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/Library/Frameworks/R.framework/Versions/3.2/Resources/library/atSNP/libs/atSNP.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.2/Resources/library/atSNP/libs/atSNP.so, 6): no suitable image found. Did find:
/Library/Frameworks/R.framework/Versions/3.2/Resources/library/atSNP/libs/atSNP.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/atSNP’
Error: Command failed (1)
This is the session info:
> sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10 (Yosemite)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] grid stats4 parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] motifStack_1.12.0 Biostrings_2.36.1 XVector_0.8.0 ade4_1.7-2 MotIV_1.24.0 grImport_0.9-0
[7] XML_3.98-1.2 GenomicRanges_1.20.4 GenomeInfoDb_1.4.0 IRanges_2.2.2 S4Vectors_0.6.0 BiocGenerics_0.14.0
[13] devtools_1.8.0
loaded via a namespace (and not attached):
[1] magrittr_1.5 GenomicAlignments_1.4.1 zlibbioc_1.14.0 BiocParallel_1.2.2 BSgenome_1.36.0
[6] lattice_0.20-31 stringr_1.0.0 httr_0.6.1 tools_3.2.0 seqLogo_1.34.0
[11] lambda.r_1.1.7 futile.logger_1.4.1 git2r_0.10.1 rversions_1.0.0 digest_0.6.8
[16] rtracklayer_1.28.4 futile.options_1.0.0 bitops_1.0-6 RCurl_1.95-4.6 memoise_0.2.1
[21] rGADEM_2.16.0 stringi_0.4-1 Rsamtools_1.20.4
As you can see, I have installed & attached both packages GenomicRanges & motifStack and still the installation message says they are not available. I have tried uninstalling & reinstalling both the packages but I still get the same error. Any suggestions will be appreciated.
UPDATE: I followed the suggestion below and still getting the following errors:
* installing to library ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library’
* installing *source* package ‘atSNP’ ...
** libs
make: Nothing to be done for `all'.
installing to /Library/Frameworks/R.framework/Versions/3.2/Resources/library/atSNP/libs
** R
** data
** preparing package for lazy loading
No methods found in "IRanges" for requests: sapply
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
No methods found in "IRanges" for requests: sapply
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/Library/Frameworks/R.framework/Versions/3.2/Resources/library/atSNP/libs/atSNP.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.2/Resources/library/atSNP/libs/atSNP.so, 6): no suitable image found. Did find:
/Library/Frameworks/R.framework/Versions/3.2/Resources/library/atSNP/libs/atSNP.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/atSNP’
Thanks
You can download the source package from the github website and install it. This gives no error on my Mac. In the terminal, type
git clone git://github.com/chandlerzuo/atSNP.git
R CMD INSTALL atSNP

Resources