jupyterhub / jupyter-rsession-proxy

Jupyter extensions for running an RStudio rsession proxy
BSD 3-Clause "New" or "Revised" License
118 stars 87 forks source link

Unable to install packages via install.packages() in R #37

Closed jj-tay closed 4 years ago

jj-tay commented 5 years ago

With the provided Dockerfile, internet routines cannot be loaded when running install.packages(), leading to a failure in the package installation.

> install.packages("sp", verbose = TRUE)
system (cmd0): /opt/conda/lib/R/bin/R CMD INSTALL
--- Please select a CRAN mirror for use in this session ---
Warning: failed to download mirrors file (internet routines cannot be loaded); using local file '/opt/conda/lib/R/doc/CRAN_mirrors.csv'
Secure CRAN mirrors

 1: 0-Cloud [https]                 2: Australia (Canberra) [https]
 3: Australia (Melbourne) [https]   4: Australia (Perth) [https]
 5: Austria [https]                 6: Belgium (Ghent) [https]
 7: Brazil (RJ) [https]             8: Brazil (SP 1) [https]
 9: Bulgaria [https]               10: Chile 1 [https]
11: China (Lanzhou) [https]        12: Colombia (Cali) [https]
13: Czech Republic [https]         14: Denmark [https]
15: France (Lyon 1) [https]        16: France (Lyon 2) [https]
17: France (Marseille) [https]     18: France (Montpellier) [https]
19: France (Paris 2) [https]       20: Germany (Münster) [https]
21: Iceland [https]                22: Indonesia (Jakarta) [https]
23: Ireland [https]                24: Italy (Padua) [https]
25: Japan (Tokyo) [https]          26: Malaysia [https]
27: Mexico (Mexico City) [https]   28: Norway [https]
29: Philippines [https]            30: Russia (Moscow) [https]
31: Spain (A Coruña) [https]       32: Spain (Madrid) [https]
33: Sweden [https]                 34: Switzerland [https]
35: UK (Bristol) [https]           36: UK (Cambridge) [https]
37: UK (London 1) [https]          38: USA (CA 1) [https]
39: USA (KS) [https]               40: USA (MI 1) [https]
41: USA (TN) [https]               42: USA (TX 1) [https]
43: USA (TX 2) [https]             44: (other mirrors)

Selection: 1
Warning: unable to access index for repository https://cloud.r-project.org/src/contrib:
  internet routines cannot be loaded
Warning messages:
1: In download.file(url, destfile = f, quiet = TRUE) :
  unable to load shared object '/opt/conda/lib/R/modules//internet.so':
  /opt/conda/lib/R/modules//../.././libk5crypto.so.3: symbol krb5int_utf8s_to_ucs2les version krb5support_0_MIT not defined in file libkrb5support.so.0 with link time reference
2: package ‘sp’ is not available (for R version 3.4.1)

As we don't have such an issue with jupyter/r-notebook which your Dockerfile is based on, I took a second look at your Dockerfile and realized that removing the last line for setting the LD_LIBRARY_PATH environment variable resolves the issue.

However, I don't quite understand the purpose of the setting the LD_LIBRARY_PATH environment variable. Thus i wanted to ask if it is safe to not set LD_LIBRARY_PATH? If not, what is a better resolution?