I want to load a module on a server using SSH
ssh server.university.com "module load moduleX"
but I'm getting the following error:
/usr/local/Modules/default/bin/modulecmd: error while loading shared` libraries: libtclx8.4.so: cannot open shared object file: No such file or directory
I tried the solutions of this thread:
How to use environment modules in a ssh command line?
That is,
ssh server.university.com "bash -lc 'module load moduleX'"
bash: module: command not found
and
ssh server.university.com "source /etc/profile; module load moduleX"
/usr/local/Modules/default/bin/modulecmd: error while loading shared libraries: libtclx8.4.so: cannot open shared object file: No such file or directory
I can load the module when I've already signed into the server. The reason for why I want to load it in the same command is that I in a pipeline want to do some estimations on the server, the rest on my computer.
Can someone please find a solution?
Here is the way I solved it:
It seems like the case I had a .bash_profile file prohibited the .profile file to be read. Took the .bash_profile file away and now it is working. I also added the following lines to the start of the .bashrc file which also was a part of the solution:
MODULE_VERSION=default
export MODULE_VERSION
LD_LIBRARY_PATH=/usr/local/pkg/tcltk/8.6.0/lib/:/usr/local/pkg/tcltk/8.6.0/lib/tclx8.4/
export LD_LIBRARY_PATH