Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problems installing the devtools package

I wish to use the devtools package. I've run the following commands:

> install.packages("devtools", dependencies = TRUE) .... > library(devtools) Error in library(devtools) : there is no package called ‘devtools’ 

What am I doing wrong?

Edit: Here are the results of re-running the install.packages command after restarting the session.

> install.packages("devtools", dependencies = TRUE) Installing package into ‘/home/evanaad/R/x86_64-pc-linux-gnu-library/3.0’ (as ‘lib’ is unspecified) --- Please select a CRAN mirror for use in this session --- Warning: dependencies ‘roxygen2’, ‘BiocInstaller’, ‘rstudio’ are not available also installing the dependencies ‘httr’, ‘RCurl’  trying URL 'http://cran.at.r-project.org/src/contrib/httr_0.2.tar.gz' Content type 'application/x-gzip' length 50183 bytes (49 Kb) opened URL ================================================== downloaded 49 Kb  trying URL 'http://cran.at.r-project.org/src/contrib/RCurl_1.95-4.1.tar.gz' Content type 'application/x-gzip' length 870915 bytes (850 Kb) opened URL ================================================== downloaded 850 Kb  trying URL 'http://cran.at.r-project.org/src/contrib/devtools_1.4.1.tar.gz' Content type 'application/x-gzip' length 105214 bytes (102 Kb) opened URL ================================================== downloaded 102 Kb  * 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/evanaad/R/x86_64-pc-linux-gnu-library/3.0/RCurl’ ERROR: dependency ‘RCurl’ is not available for package ‘httr’ * removing ‘/home/evanaad/R/x86_64-pc-linux-gnu-library/3.0/httr’ ERROR: dependencies ‘httr’, ‘RCurl’ are not available for package ‘devtools’ * removing ‘/home/evanaad/R/x86_64-pc-linux-gnu-library/3.0/devtools’  The downloaded source packages are in     ‘/tmp/RtmptvmTrA/downloaded_packages’ Warning messages: 1: In install.packages("devtools", dependencies = TRUE) :   installation of package ‘RCurl’ had non-zero exit status 2: In install.packages("devtools", dependencies = TRUE) :   installation of package ‘httr’ had non-zero exit status 3: In install.packages("devtools", dependencies = TRUE) :   installation of package ‘devtools’ had non-zero exit status 
like image 956
Evan Aad Avatar asked Jan 04 '14 16:01

Evan Aad


People also ask

Do you need Rtools for Devtools?

However, we recommend you install Rtools, so you can take full advantage of devtools. Soon, you will want to use devtools::install_github() to install R packages from GitHub, instead of CRAN. You will inevitably need to build a package that includes C/C++ code, which will require Rtools.

What is Devtools package?

The aim of devtools is to make package development easier by providing R functions that simplify common tasks. An R package is actually quite simple. A package is a template or set of conventions that structures your code.

What is Devtools used for in R?

The devtools package contains functions that help with R package development. These functions include create , which creates the initial structure for a new package, as well as a number of functions for adding useful infrastructure to the package directory and functions to load and document the package.


1 Answers

As per damienfrancois's suggestion, I installed libcurl4-gnutls-dev and the problem was solved.

EDIT (@dardisco)

In your shell:

apt-get -y build-dep libcurl4-gnutls-dev apt-get -y install libcurl4-gnutls-dev 
like image 64
Evan Aad Avatar answered Oct 06 '22 06:10

Evan Aad