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

Dave Anselmi anselmi at americanisp.net
Fri Oct 12 22:49:46 MDT 2001


"Jed S. Baer" wrote:

> Dave, I don't believe it's a vi error. /bin/vi doesn't exist, therefore
> can't be run. So it would make sense that bash would complain about not
> finding it. If it were a vi error, I'd expect the message to look more
> like:
>   "vi: unable to frobble the mungler"
> or whatever.
>
> $ ls /bin/vi
> ls: /bin/vi: No such file or directory

Yes, you're right, and Tim pointed out the real problem.  The thing is, you
get the same error if you compile something with a shared library (like
/bin/vi in this case), and the library can't be found (because you didn't run
ldconfig after installing it, or you should have linked statically vs.
dynamically).  You don't get a vi error message, because vi can't run until
the pieces are loaded, but the bash error is completely unhelpful about which
file is really missing.

I guess most people never run into that problem, but the people at
www.linuxfromscratch.org do frequently.

Dave





More information about the clue-tech mailing list