The FreeBSD Diary |
(TM) | Providing practical examples since 1998If you buy from Amazon USA, please support us by using this link. |
Command not found
19 March 1999
|
This article deals with what to do when you get the above error message but you can see the command and you know it works |
Background
|
I 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 fix
|
I was able to run it by issuing the following command:kennett# /usr/local/bin/lynx 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: source ~root/.login After that, I was able to run lynx by just typing lynx |
Postscript
|
I've since been told that doing a rehash would solve the above problem. See man csh for details. |