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.
install.packages("data.table", repos = "https://Rdatatable.github.io/data.table")
library(data.table)
test.data.table()
If you want to install latest CRAN release just skip repos
argument to install.packages
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.