0

I'm new to R and I've compiled it myself on Ubuntu 14.04.3 (x64). Note, I am up to date with the R source:

blong@work:~/Documents/Work/REPOS__svn/R/R-3-2-branch$ svn info |head -n 7
Path: .
Working Copy Root Path: /home/blong/Documents/Work/REPOS__svn/R/R-3-2-branch
URL: https://svn.r-project.org/R/branches/R-3-2-branch
Relative URL: ^/branches/R-3-2-branch
Repository Root: https://svn.r-project.org/R
Repository UUID: 00db46b3-68df-0310-9c12-caf00c1e9a41
Revision: 69384
blong@work:~/Documents/Work/REPOS__svn/R/R-3-2-branch$ svn status -u
Status against revision:  69392

Running configure and make in R's 3.2.2 branch have completed successfully and I'm able to use a variety of packages within an R session. However, I'd like to check that all of my libraries are up to date. In R 3.2.2 , I'm invoking update.packages(). When the function is invoked, I'm prompted to select a CRAN mirror :

CRAN mirror selection dialog

Assuming everything is fine and this is a non-issue, I select the main ("O-Cloud [https]") mirror from the dialog. The dialog closes and I'm returned to my R prompt with a duplicate message saying "unsupported URL scheme".

Simultaneously, I receive an error in my R session upon invoking update.packages():

> getOption("repos")
    CRAN 
"@CRAN@" 
> update.packages()
--- Please select a CRAN mirror for use in this session ---
Error in download.file(url, destfile = f, quiet = TRUE) : 
  unsupported URL scheme
Warning: unable to access index for repository https://cran.rstudio.com/src/contrib:
  unsupported URL scheme
> 

Considering that perhaps this is an issue with HTTPS, I try a non-SSL mirror and similarly nothing happens (perhaps there are no updates, but I'd like a message that tells me this). However, this time I don't receive the second "unsupported URL scheme" message after the dialog closes :

> update.packages()
--- Please select a CRAN mirror for use in this session ---
Error in download.file(url, destfile = f, quiet = TRUE) : 
  unsupported URL scheme
> 

It seems that under the hood, R uses a library called RCurl to do some of it's HTTP/S interaction. As far as I can tell, I'm using a supported version of curl / libcurl :

blong@work:~$ curl --version
curl 7.35.0 (x86_64-pc-linux-gnu) libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smtp smtps telnet tftp 
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP 

Any thoughts on this? It seems similar to this mailing list discussion, but I'm not sure if this is an issue or I'm doing something wrong.

IRTFM
  • 258,963
  • 21
  • 364
  • 487
blong
  • 2,815
  • 8
  • 44
  • 110
  • 1
    The appropriate site for this question among the various R mailing lists might be R-SIG-Debian: https://stat.ethz.ch/mailman/listinfo/r-sig-debian , since Ubuntu is a Debian fork. – IRTFM Sep 16 '15 at 18:07
  • @BondedDust I appreciate that (also appreciate your edit to the tags :) ). I agree with the change to the tags, certainly. However, I'm not sure I agree regarding where this question should be posted (e.g. what if it affects all users on Linux / Unix and not just Debian-based distributions). I'll continue investigating and post here if I find a solution. – blong Sep 16 '15 at 18:17
  • What happens if you do `options(repos = c(CRAN = "https://cran.rstudio.com"))` before `update.packages()`? – maccruiskeen Sep 16 '15 at 18:23
  • Did you read the Ubuntu help pages on setting up repository keys for R packages? It's not clear to me whether that's your problem or not. – Carl Witthoft Sep 16 '15 at 18:34
  • Thanks all for the help. See [my answer](http://stackoverflow.com/a/32617545/320399) for details. It seems I forgot a critical step upon configuring R. – blong Sep 16 '15 at 19:56

1 Answers1

3

Well don't I feel silly. I don't come from a very strong C/C++ background. So make isn't really in my wheelhouse apart from following guides, etc.

I was looking through this with a colleague and we discussed the steps I took to get R configured on my machine. Effectively I did this :

svn checkout https://svn.r-project.org/R/branches/R-3-2-branch ~/R-3-2-branch
mkdir ~/R-3-2-branch.build
cd ~/R-3-2-branch.build
../R-3-2-branch/configure # Returns successfully
make

All set, right? :) I must be, because I can use ~/R-3-2-branch.build/bin/R and everything inside that R session (except for the above error that prompted this question) seems to work just fine. I've installed all sorts of things from CRAN, Bioconductor and GitHub; so obviously the issue must be something else.

Oh, also, I'm pretty sure all of the dependencies are properly available (in terms of platform dependencies), since I did this :

blong@work:~$ sudo apt-get build-dep r-base

Well, yeah, it was something else! I forgot to run sudo make install!

I admit, I'm not entirely sure of which order I performed configure, apt-get build-dep r-base, and make in. However, forgetting sudo make install seems to be the culprit.

This time around, I did the full sequence :

blong@work:~$ cd ~/R-3-2-branch.build
blong@work:~$ ../R-3-2-branch/configure
blong@work:~$ make
blong@work:~$ sudo make install

And everything appears to be running happily inside R :

> update.packages()
--- Please select a CRAN mirror for use in this session ---
> 

(When prompted, I've selected the O-Cloud [https] mirror)

Thanks all for the help!

blong
  • 2,815
  • 8
  • 44
  • 110
  • Good clear answer. Many developers include a ReadMe w/ their source in which they provide the exact build steps ( make, make check, make install, etc) for their code; I bet there's some such file somewhere in the R-source-o-sphere :-) – Carl Witthoft Sep 17 '15 at 11:46
  • @CarlWitthoft Thanks! Yes, I'm sure you're right. Can't believe I missed that step. Although, since I'm not %100 certain when I invoked `apt-get build-dep r-base` it is possible that this was a PEBCAK issue (Problem Exists Between Chair And Keyboard) :) – blong Sep 18 '15 at 14:03