I'm having an issue where I get the error
bash: stp: command not found
(stp is the name of the file I am trying to execute)
Even when I have the folder that this program resides inside is in my $PATH variable. A couple of things I've already checked:
-Making sure I am editing the $PATH in the shell that I am operating. I edited the .bashrc file residing in my home directory adding $HOME/bin
to the path. I have verified that I am in the bash shell by typing
$ ps $$
which returned bash as the command.
-Making sure that what I added in .bashrc actually affected the path (after restarting the shell, but I have also restarted the computer since then). Typing
$ echo $PATH
does indeed return /home/myself/bin
as part of the path. I will note that the file of interest lies inside a folder inside of /home/myself/bin
, but that shouldn't matter, right?
-Lastly, /pathtofile/stp
executes the file as I would expect. Or just making sure I am in the directory and typing ./stp
.
So if it's in my $PATH variable, I edited the right configuration file for the bash shell, made sure I am running bash, have restarted the shell since then, I'm sure I'm overlooking something really trivial. I'm still pretty new to Unix/Linux (running Debian), so I don't know all the ins and outs. But from what I understand, I should be able to type $ stp
no matter where I am and it should search through the path and find it inside of there.
stp
resides in/path/to/tools/
; then try adding the following to your script before you attempt to invoke it:PATH="/path/to/tools/:$PATH"
sudo make install
to put the executable, libraries, etc in the correct places. (Assuming your makefile has theinstall
target, of course.)