-
Notifications
You must be signed in to change notification settings - Fork 654
Installation dependencies errors in Linux OS (Ubuntu)
Hello,
I experienced some problems when first attempting to install rCharts. The following is an account of how I was able to install the rCharts package on my Linux machine, which may be useful for some users.
linux system
user:~$ uname -a
Linux desktop 3.13.0-8-generic #27-Ubuntu SMP Fri Feb 7 02:01:37 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
R session info sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C LC_TIME=en_CA.UTF-8 LC_COLLATE=en_CA.UTF-8
[5] LC_MONETARY=en_CA.UTF-8 LC_MESSAGES=en_CA.UTF-8 LC_PAPER=en_CA.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_3.0.2
first error when installing package
install.packages("rCharts")
Installing package into ‘path_to_R/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘rCharts’ is not available (for R version 3.0.2)
After this error, I followed ramnathv's recommendation for downloading the tar file at:
https://github.com/ramnathv/rCharts/archive/master.tar.gz
install.packages(path/to/tar/file, repos = NULL, type="source")
Installing package into ‘path_to_R/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
Warning in untar2(tarfile, files, list, exdir, restore_times) :
skipping pax global extended headers
ERROR: dependencies ‘RCurl’, ‘RJSONIO’, ‘whisker’, ‘yaml’ are not available for package ‘rCharts’
- removing ‘path_to_R/R/x86_64-pc-linux-gnu-library/3.0/rCharts’
Warning in install.packages :
installation of package ‘~/Downloads/rCharts-master.tar.gz’ had non-zero exit status
Installing the dependencies resolved this error, but required additional problem solving:
install.packages("RCurl")
Installing package into ‘path_to_R/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
also installing the dependency ‘bitops’
trying URL 'http://cran.rstudio.com/src/contrib/bitops_1.0-6.tar.gz'
Content type 'application/x-gzip' length 8734 bytes
opened URL
etc, etc
** package ‘RCurl’ successfully unpacked and MD5 sums checked
checking for curl-config... no
Cannot find curl-config
ERROR: configuration failed for package ‘RCurl’
- removing ‘path_to_R/R/x86_64-pc-linux-gnu-library/3.0/RCurl’
Warning in install.packages :
installation of package ‘RCurl’ had non-zero exit status
Installation of RCurl failed due to a missing dependency on curl in the OS, which is ubuntu in my case. This is solved by installing curl in the linux terminal, as per:
http://www.omegahat.org/RCurl/FAQ.html
sudo apt-get install libcurl4-openssl-dev
After this OS dependency was resolved, ramnathv's suggested R code for resolving the missing dependencies fixed the rCharts installation problems:
deps = c('RCurl', 'RJSONIO', 'whisker', 'yaml')`
for (dep in deps){
install.packages(dep)
}
R session info after installation
library(rCharts)
sessionInfo()
> R version 3.0.2 (2013-09-25)
> Platform: x86_64-pc-linux-gnu (64-bit)
> locale:
> [1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C LC_TIME=en_CA.UTF-8 LC_COLLATE=en_CA.UTF-8
> [5] LC_MONETARY=en_CA.UTF-8 LC_MESSAGES=en_CA.UTF-8 LC_PAPER=en_CA.UTF-8 LC_NAME=C
> [9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
> other attached packages:
> [1] rCharts_0.4.2
> loaded via a namespace (and not attached):
> [1] grid_3.0.2 lattice_0.20-24 plyr_1.8 RJSONIO_1.0-3 tools_3.0.2 whisker_0.3-2 yaml_2.1.10