Why does my terminal show -bash: /usr/share/lmod/lmod/init/sh: No such file or directory
-bash: /usr/share/modules/init/sh: No such file or directory
When I open up my terminal this appears first. I was trying to install lmod, and I think this might be a result due to that. How do I remove it ?
Solution 1:
EDIT:
As per this, installation of lmod
probably changed one or more of the files in /etc/profile.d/*.sh
.
You could try checking this (e.g., with the last modification date), and then look for the culprit.
Some info you could post to help:
- The contents of "suspicious" files among those referred to.
- The sequence of commands you used to install
lmod
. You could get this if you havehistory
enabled. - An exact copy of everything you get when launching a terminal, including possibly the prompt.
From a terminal, execute bash
. You will likely see the same error message.
If so, you can execute (preferably from a new terminal) bash -x -v
. The options are:
-v Print shell input lines as they are read.
-x Print commands and their arguments as they are executed.
This way you would be able to identify the culprit of the error message.