Command not foundThis article deals with what to do when you get the above error message but you can see the command and you know it works
BackgroundI had just finished Installing the lynx port from the Internet and was trying to run lynx. But I encountered the following problems:
kennett# lynx lynx: Command not found. kennett# which lynx lynx: Command not found.
But lynx was at /usr/local/bin and had the correct file permission:
-r-xr-xr-x 1 root wheel 823640 Mar 15 21:39 lynx
The fixI was able to run it by issuing the following command:
I initially thought that /usr/local/bin was not in my path. But it was as evidenced by the following:
kennett# echo $PATH /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/bin:/usr/X11R6/bin:/root/bin
I was running as root, so I issused the following command:
After that, I was able to run lynx by just typing lynx
Would the ‘rehash’ command have done the trick (if you were using a ‘csh’-flavoured shell)?
Yes, as noted in the final section of the article.