[CLUE-Tech] Why can't bash find vi?

Dave Anselmi anselmi at americanisp.net
Fri Oct 12 14:54:02 MDT 2001


"Jed S. Baer" wrote:

> However, an xterm which was openned before I did all this has this
> problem:
>
>   $ which vi
>   /usr/local/bin/vi
>   $ vi
>   bash: /bin/vi: No such file or directory
>   $ alias | grep -i vi (no matches)
>   $ env | grep -i vi (no matches)
>
> new xterms don't have this trouble.

I don't know why bash is finding a /bin/vi - it makes sense that it runs that
one before /usr/local/bin/vi, but only if there is a file there, which seems
not the case in your new xterms.

But as to the error message you get, it is not a bash error, it's a vi error.
Bash is running /bin/vi, which is complaining because it can't find a file.
Usually (in my experience) this is caused by missing libraries but that is
strange on an rpm system.  Look to see if there is a /bin/vi file or link.  If
there is, delete it since you don't want it there.

Dave





More information about the clue-tech mailing list