Error installing WGCNA package

It looks like it’s a problem with the version of the jpeg.so file in the system wide R 4.0.0 install? install.packages(“WGCNA”) proceeds fine until:

Error in dyn.load(file, DLLpath = DLLpath, …) :
unable to load shared object ‘/spack/apps/linux-centos7-x86_64/gcc-8.3.0/r-4.0.0-jfy3icn4kexk7kyabcoxuio2iyyww3o7/rlib/R/library/jpeg/libs/jpeg.so’:
libjpeg.so.9: cannot open shared object file: No such file or directory
Calls: … asNamespace -> loadNamespace -> library.dynam -> dyn.load
Execution halted
ERROR: lazy loading failed for package ‘WGCNA’

  • removing ‘/home1/ckenkel/R/x86_64-pc-linux-gnu-library/4.0/WGCNA’

@ckenkel Use module load libjpeg libjpeg-turbo r and then start an R session and try installing the WGCNA package. The jpeg.so library is linked to those modules and they need to be loaded in order for R to find it. For similar errors with “cannot open shared object file”, typically that means a related module needs to be loaded.

Success - thanks!!