ismailsunni / dockeRs

A collection of docker image of various R implementations on various platform both vanilla and with geospatial R packages.
2 stars 1 forks source link

TERR + Debian/Ubuntu #11

Closed ismailsunni closed 4 years ago

ismailsunni commented 4 years ago

Not able to install any packages, got this error message:

> install.packages('ctv')
Warning message:
In available.packages(contriburl = contriburl, type = type) : Malformed repository(?): cannot find any of c("PACKAGES.gz", "PACKAGES") in "https://tran.tibco.com/terr50/src/contrib"
Warning messages:
1: In available.packages(contriburl = contriburl, type = type) : Malformed repository(?): cannot find any of c("PACKAGES.gz", "PACKAGES") in "https://cloud.r-project.org/src/contrib"
2: In install.packages("ctv") : Could not download any of the desired packages
NULL
ismailsunni commented 4 years ago

The same problem found in TIBCO support page: https://support.tibco.com/s/article/Tibco-KnowledgeArticle-Article-49266

 1). Start Internet Explorer and verify that you are able to load the following URL:

https://cran.rstudio.com/bin/windows/contrib/3.2 

Change the URL so it matches the URL from the warning message. If you cannot access the URL in Internet Explorer, you may need to go to Internet Explorer > Tools > Internet Options > Connections > LAN settings and configure a proxy, or otherwise make sure you have a working Internet connection.

2). Once you have verified that Internet Explorer has access to the CRAN/TRAN repositories, start the TERR Console and run the command setInternet2(TRUE) before proceeding with the package installation:

   > setInternet2(TRUE)
   > install.packages("dplyr")

3). If the previous s

It doesn't solve the problem, unfortunately. Even the setInternet2(TRUE) is not available. I check the internet connection, it is working.

nuest commented 4 years ago

I get the same error. When I try to download only the failing URL, we learn a little bit more:

> download.file("https://cloud.r-project.org/src/contrib", destfile = "contrib.txt")
Trying to download URL 'https://cloud.r-project.org/src/contrib' to file 'contrib.txt'
  Downloaded 0 bytes
Error in download.file("https://cloud.r-project.org/src/contrib", des : error setting certificate verify locations:
  CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: /etc/ssl/certs

So when I installed curl to try the URL, it worked. I found out that curl installs the command update-ca-certificates, which solves the problem. So, your base image debian:stretch does not include the base certificates. If I add that to the Dockerfile, it works, see changes in #38 :

daniel@nuest:~/git/dockeRs/terr-5.0.0-debian$ make run-dockeRs 
Run TERR 5.0.0 on Debian Docker image.
docker run  -it --rm ismailsunni/terr-5.0.0-debian
TIBCO Software Inc. Confidential Information
Copyright (C) 2011-2019 TIBCO Software Inc. ALL RIGHTS RESERVED
TIBCO Enterprise Runtime for R version 5.0.0 for Linux 64-bit

Type 'help()' for help.
Type 'q()' to quit.
> install.packages("ctv")
Trying to download URL 'https://cloud.r-project.org/src/contrib/ctv_0.8-5.tar.gz' to file '/tmp/TERR_00016b8b45671/downloaded_packages/ctv_0.8-5.tar.gz'
  Downloaded 363914 bytes
* unpacking *source* package ctv from "/tmp/TERR_00016b8b45671/downloaded_packages/ctv_0.8-5.tar.gz" to "/tmp/TERR_00016b8b45671/source_000174b0dc515"
* checking MD5 checksums
    MD5 checksums ok
* installing *source* package from "/tmp/TERR_00016b8b45671/source_000174b0dc515/ctv" to "/home/docker/tibco/site-library"
** R
** inst
** help
** installing package indices
** testing if installed package can be loaded
** Installed package 'ctv' into library directory '/home/docker/tibco/site-library'
> 
ismailsunni commented 4 years ago

Thanks, it works.