1

Trying to use Hadleys devtools package I am getting a certification error:

install_github("devtools")
Installing github repo(s) devtools/master from hadley
Installing devtools.zip from https://github.com/hadley/devtools/archive/master.zip
  Error in function (type, msg, asError = TRUE)  : 
  Peer certificate cannot be authenticated with given CA certificates

Google search tells me that this is a curl issue. I am no nearer. Using "git" from the command line I can pick up anything I want from github, - I don't get this error. It only appears when I try to connect to github from R.

I am using ubuntu 12.10, libcurl 7.22.0 and R 3.0

Does anyone have an idea what to do to fix this?

Sincerely H.

stuttungr
  • 399
  • 1
  • 4
  • 12
  • 1
    Can you provide the full output of `sessionInfo()`? – Dason May 09 '13 at 17:40
  • Googling some more I found that curl related issues in R had been solved by reinstalling RCurl. I tried that, and then – stuttungr May 09 '13 at 17:52
  • 4
    And then ? What a suspense ! – juba May 09 '13 at 17:53
  • Googling some more I found that curl related issues in R had been solved by reinstalling RCurl. I tried that, and then....(sorry, lost connection) this worked. SessionInfo tells me that Rcurl is loaded into namespace so I suspect that there was some issue between my then current Rcurl and my curl library. – stuttungr May 09 '13 at 17:58
  • you can clone the directory then R CMD build and R CMD install on your local machine. I recently ran into this same issue trying to install ffbase from github and that was how I ended up working around it – Jake Burkhead May 09 '13 at 18:06
  • also theres something funny about trying to install a package using a function from that same package – Jake Burkhead May 09 '13 at 18:21

2 Answers2

5

This issue is resolved. There was some mismatch between the version of RCurl and the curl library. Re-installing RCurl fixed the problem.

stuttungr
  • 399
  • 1
  • 4
  • 12
2

Try

$ git clone git://github.com/hadley/devtools.git
$ R CMD build devtools
$ R CMD install devtools_1.2.99.tar.gz

or just

$ git clone git://github.com/hadley/devtools.git
$ R CMD install devtools

both worked for me on Ubuntu 12.04. Someone else can weigh in on whether there's any difference in building first then installing from tarball or not. I would guess no, but I have no idea

edit: trying this on os X

* installing to library ‘/Library/Frameworks/R.framework/Versions/3.0/Resources/library’
* installing *source* package ‘devtools’ ...
** libs
sh: make: command not found
ERROR: compilation failed for package ‘devtools’
* removing ‘/Library/Frameworks/R.framework/Versions/3.0/Resources/library/devtools’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.0/Resources/library/devtools’
Jake Burkhead
  • 6,435
  • 2
  • 21
  • 32
  • Thanks Jake, That is how I did it with rCharts recently. But I would like to be able to access this directly. Which seems to be working for now (after I updated RCurl) – stuttungr May 09 '13 at 18:27