'error while loading shared libraries: libicuuc.so.50

I try to submit a R script to SLURM in CentOS 7, like this:

#!/bin/bash
#SBATCH -J test                   
#SBATCH -o test.out               
#SBATCH -p compute                
#SBATCH --qos=normal              
#SBATCH -N 1                      
#SBATCH --ntasks-per-node=8       
#SBATCH --cpus-per-task=1         
#SBATCH --job-name=rtest

Rscript --vanilla Rhelp.R

Then system will return a jobid, but the R script does not work. I can assure this script can run in command line. Then I have found in test.out, like this:

error while loading shared libraries: libicuuc.so.50: 
cannot open shared object file: No such file or directory

I am a freshman in SLURM and Linux, thx!



Solution 1:[1]

It looks like the libicu RPM package is not installed on the compute nodes.

Solution 2:[2]

Just because it may be installed on the head node doesn't mean it's installed on the compute node(s). You could fire off the same ldconfig command in a Slurm job and view the results to confirm that's the case.

Solution 3:[3]

With the module avail command from the head node you list all available modules and loaded modules are marked somehow depending on your OS; for me they are marked with (L). All you need to do is load those loaded modules from your file script each of which is invoked with the line module load path_to_module. Whereas, path_to_module is as is indicated with the previous command module avail. Or without resorting to module avail you could use module list for currently loaded modules.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 damienfrancois
Solution 2 Dan
Solution 3