Q: Shared R-packages in multiple Linux Distributions Now I have two Linux Distribution in two different partitions. I have a Data partition that is shared between them so they can use common files and folders. I have the same (major) version of R in both distributions. My question is:


*

*Can I use a common R-package path so that I just need to install R-packages in one and can use in other?

*What possible problems can I face in the situation?


A: Yes, you do.
Example the brew and conda which create a directory to all bins and libs installed with those packages.
So, consider using one of them. Anyway, you might include the binaries on ENV using the var PATH.

export PATH="my/binary/path:"$PATH  

Additionally, you might prefer edit both installations .bashrc or .bash_profile adding a line to edit PATH.
Particularly, I like to create a .bashrc/ directory and include configuration files within (mypath.sh, myalias.sh, myfunctions.sh, ...) and call execution of all files with the directory just including a line on the bottom of the .bashrc file a line like this:  
for file in ~/.bashrc.d/*;
do
        source $file
done


A: This might work for packages with only R code. For packages with compiled code I do expect problems:


*

*Do both Linux distributions use the same linker and compiler?

*Do both Linux distributions use the same system libraries?

