Problems with vroom and libc.so.6

Hello everyone,

Sorry for spending your time, I would like to ask something about the package of vroom in R. Turns out I'm using vroom to open multiple files. The strange thing is that when I run the script from R terminal everything works fine, but when I run the process from a crontab there is a moment, during that opening of many files, that gives me the following error:

Error in gzfile(file, "rb") : cannot open the connection
Calls: vroom ... .rlang_cli_format_fallback -> .rlang_cli_compat ->
execution halted
sh: error while loading shared libraries: libc.so.6: cannot open shared object file: Error 24

Do you know about this? Have you ever had a problem like this with vroom?

Thank you very much!

Kind regards,
Lorena

Does your script have a shebang at the beginning? If so, what is it? It can change the environment on which the script is executed.

Hello,

Yes, I have #!/bin/bash. Do you know how can I solve this? Because I have several scripts running in a .bash file.

Thank you!

Lorena

For an RScript I would expect something like this

#! /usr/bin/env Rscript

Are you calling R from whitin a bash script? If so, why not to execute the R script directly?

Ok I see, I am not an expert with environments. I have several R scripts running in that bash script but also I have some bash running in that bash. I think that if I use #! /usr/bin/env the bash scripts will not work?

Thank you!

Lorena

It might be, can you post the content of your bash script (or a similar made up example )? Maybe the way you are calling R inside it is the problem.

Thank you very much!

This is part of the script:

#!/bin/bash

#**********************************************************************************
# Gonzalo M. Diaz
# MINISTERIO DE DEFENSA - Servicio Meteorologico Nacional, Buenos Aires, 08.01.2016
#**********************************************************************************
#
###################################################################################
### RUTA DE: 
##### LOS SCRIPTS DEL PROCESO DE VIC+ROUTE OPERATIVOS
path='/home/gdiaz/Documentos/VIC+route/OBS'
path_post='/home/gdiaz/Documentos/VIC+route/POST-PROCESAMIENTO'
###################################################################################
#
LOG=${path}'/LOG_VIC-route_operativo.txt'
rm ${LOG}
echo "---------------------------------------------------------------------------------------" >> $LOG 2>&1
echo "COMANDOS DE SALIDA DE LOS SCRIPTS DEL PROCESO DE SIMULACION DEL VIC Y ROUTE OPERATIVOS" >> $LOG 2>&1
echo "---------------------------------------------------------------------------------------" >> $LOG 2>&1
date >> $LOG 2>&1
echo " 
     " >> $LOG 2>&1
#
#
#**********************************************************************************
# Paso 01 -> De la operatividad del Modelo VIC + routeo
#            Kriging sobre las observaciones de la red de estaciones del SMN
#**********************************************************************************
Rscript ${path}/01_Interpola-Kriging.R >> $LOG 2>&1

#**********************************************************************************
# Paso 02 -> De la operatividad del Modelo VIC + routeo
#            Genera archivos "data" para leer por el VIC como archivos de entrada
#**********************************************************************************
Rscript ${path}/02b_Genera-data-VIC.R >> $LOG 2>&1

#**********************************************************************************
# Paso 03 -> De la operatividad del Modelo VIC + routeo
#            GeneraciĆ³n del archivo de Control del modelo VIC para la corrida
#**********************************************************************************
${path}/03_Genera-control-VIC.bash >> $LOG 2>&1

I don't have much experience with bash scripts and I can't find anything about enviroments when calling RScript from whitin bash. Hopefully someone else here has experience with this.

On a side note, I think using GNU make to develop a data pipeline is a more robust solution for this use case. Here is a nice paper on the topic if you are curious.

https://www.researchgate.net/publication/344010598_Using_GNU_Make_to_Manage_the_Workflow_of_Data_Analysis_Projects

Thank you, I will take a look to the publication. Lorena