noi-techpark / odh-docs

Open Data Hub (http://opendatahub.com/) Documentation
http://opendatahub.readthedocs.io/en/latest/index.html
3 stars 4 forks source link

New R tutorial: Install package fails if prerequisites are missing #213

Closed Piiit closed 3 years ago

Piiit commented 3 years ago

PAGE = https://docs.opendatahub.bz.it/en/latest/howto/r-howto.html#howto-r

During the trial of the new R tutorial, I've got the following error (solution below):

PROBLEM: Some steps I took:

$ Rscript -e "install.packages('SPARQL')"
Installing package into ‘/home/pemoser/.local/lib/R’
(as ‘lib’ is unspecified)
also installing the dependency ‘RCurl’

trying URL 'https://cloud.r-project.org/src/contrib/RCurl_1.98-1.3.tar.gz'
Content type 'application/x-gzip' length 728630 bytes (711 KB)
==================================================
downloaded 711 KB

trying URL 'https://cloud.r-project.org/src/contrib/SPARQL_1.16.tar.gz'
Content type 'application/x-gzip' length 6548 bytes
==================================================
downloaded 6548 bytes

* installing *source* package ‘RCurl’ ...
** package ‘RCurl’ successfully unpacked and MD5 sums checked
** using staged installation
checking for curl-config... no
Cannot find curl-config
ERROR: configuration failed for package ‘RCurl’
* removing ‘/home/pemoser/.local/lib/R/RCurl’
ERROR: dependency ‘RCurl’ is not available for package ‘SPARQL’
* removing ‘/home/pemoser/.local/lib/R/SPARQL’

The downloaded source packages are in
    ‘/tmp/RtmpcdhsLo/downloaded_packages’
Warning messages:
1: In install.packages("SPARQL") :
  installation of package ‘RCurl’ had non-zero exit status
2: In install.packages("SPARQL") :
  installation of package ‘SPARQL’ had non-zero exit status
pemoser@artax ~ (✔)
$ Rscript -e "install.packages('RCurl')"
Installing package into ‘/home/pemoser/.local/lib/R’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/RCurl_1.98-1.3.tar.gz'
Content type 'application/x-gzip' length 728630 bytes (711 KB)
==================================================
downloaded 711 KB

* installing *source* package ‘RCurl’ ...
** package ‘RCurl’ successfully unpacked and MD5 sums checked
** using staged installation
checking for curl-config... no
Cannot find curl-config
ERROR: configuration failed for package ‘RCurl’
* removing ‘/home/pemoser/.local/lib/R/RCurl’

The downloaded source packages are in
    ‘/tmp/RtmpFRcoqG/downloaded_packages’
Warning message:
In install.packages("RCurl") :
  installation of package ‘RCurl’ had non-zero exit status

SOLUTION: On debian-based systems:

apt install libcurl4-gnutls-dev

... then do the steps in the tutorial..

stefanodavid commented 3 years ago

Hi @Piiit thanks for the feedback. I did not encounter the error. I will add this as a ~troubleshooting section~ requirement in the existing tutorial, is this fine?

Piiit commented 3 years ago

Perfect