FORUMPreferred way to install R packages in Cedar
vguerracanedo asked 4 years ago

Hi Everyone,
I have been installing my R-packages in the cluster by directing the packages to be installed in my personal libraries: (install.packages(biocLite(‘edgeR’), lib=’~/R/x86_64-pc-linux-gnu-library/3.4′) or (biocLite(“goseq”, lib=”~/R/x86_64-pc-linux-gnu-library/3.4″)).
One of the problem with this approach is that it does not work well when the library being installed has to update libraries that are not set up in my personal library directory. In some cases, some dependencies just don’t install well at all (this example error comes up when I’m installing the package ‘goseq’: Error: package or namespace load failed for ‘RSQLite’ in dyn.load(file, DLLpath = DLLpath, …): \ unable to load shared object ‘/home/vguerra/R/x86_64-pc-linux-gnu-library/3.4/RSQLite/libs/’: \ /home/vguerra/R/x86_64-pc-linux-gnu-library/3.4/RSQLite/libs/ undefined symbol: __builtin_mul_overflow)
I was wondering if anyone else has a better approach for Cedar?

1 Answers
jrosner Staff answered 4 years ago

Hi Vanessa,
I think the method you’re using for installing locally is fine, but I believe the issue you’re having is related to the compiler.
see here:
So how to fix?  well, when you log into cedar, the default compiler is intel/2016.4 
instead you want to do the following when you login:

module load gcc/5.4.0
module load r/3.4.0

Now go ahead an run R and install ‘goseq’.  You also might want to try deleting the existing RSQLite package dir before running this… just in case.
Let me know if this works for you.