Hi there,
Thanks for your reply.
I flow the steps according to the URL https://modules.readthedocs.io/en/latest/INSTALL.html
./configure --prefix=$HOME/INSTALL/Modules --with-tcl=$HOME/INSTALL/tcl/latest/lib/
Just now, I re-try to create the link under /etc/profile.d/ and remove the $HOME/INSTALL/Modules/init/bash in ~/.bashrc , then re-boot the system.
lrwxrwxrwx 1 root root 40 Jan 10 06:47 modules.csh -> /home/u/INSTALL/Modules/init/profile.csh
lrwxrwxrwx 1 root root 39 Jan 10 06:47 modules.sh -> /home/u/INSTALL/Modules/init/profile.sh
If I open the default terminal under the Ubuntu machine, it says 'module : command not found' when run 'module list'.
But if I login via ssh-client from windows to ubuntu, both 'module list' and 'module avail' works as expected.
I look into the file /etc/profile.d/modules.sh, it firstly checks the shell type and then , run ~/INSTALL/Modules/init/bash or sh.
Finally, I just remove links /etc/profile.d/modules.sh and /etc/profile.d/modules.csh. And put $HOME/INSTALL/Modules/init/bash in ~/.bashrc. Everything works well under local terminal of Ubuntu machine or login via ssh.
I think the root-cause is about whether source INSTALL/Modules/init/bash takes effect.
Still needs further analysis about why the links under /etc/profile.d/ does not work.
Thanks,
BR/HM
Ubuntu machine:
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
________________________________
From: Zhéxué M. Krawutschke <sys...@ro...>
Sent: Monday, January 9, 2023 4:17 PM
To: Environment Modules usage and discussion. <mod...@li...>
Subject: Re: [Modules] How to check whether initrc has been read successfully?
Hey there,
did yo create the link under /etc/profile.d/ ???
like:
ln -s /usr/local/Modules/Release_5/5.2.0/init/profile.csh modules.csh
ln -s /usr/local/Modules/Release_5/5.2.0/init/profile.sh modules.sh
Did you can run „ml avail“ ? If yes, can you share your „initrc“ please?
AND last question: With which „configure“ - statement did you compile it?
Bes regards
Z. Matthias
On Montag, Jan. 09, 2023 at 3:33 PM, Hiweed Mandriva <hiw...@ho...<mailto:hiw...@ho...>> wrote:
Hi there,
I build modules and install to $HOME/INSTALL/Modules
And I add some 'module add' commands in $HOME/INSTALL/Modules/etc/initrc, but it seems that commands in initrc does not take effect
Just wonder how can I check if initrc take effect?
Thanks,
// HM
_______________________________________________
Modules-interest mailing list
Mod...@li...
https://lists.sourceforge.net/lists/listinfo/modules-interest
|