Bug 120 - _PATH_VI is set to /usr/bin/vi instead of /bin/vi
_PATH_VI is set to /usr/bin/vi instead of /bin/vi
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Cristian Gafton
: 333 335 378 645 692 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 1998-11-18 07:44 EST by rhaig
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 1998-12-11 17:43:49 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description rhaig 1998-11-18 07:44:42 EST
/usr/bin/vi does not exist.
	$ which vi
in 5.1 /usr/bin/vi is a link to ../../bin/vim
Comment 1 rhaig 1998-11-18 07:45:59 EST
this may affect other platforms as well
Comment 2 Cristian Gafton 1998-11-20 08:19:59 EST
This is a glibc problem; the installed paths.h provide an incorrect
location for the vi executable.
Comment 3 rhaig 1998-11-20 11:26:59 EST
change in summary may have made record unclear
original error was result of
	crontab -e
when $EDITOR is unset
yes, this may be due to difference in paths.h, but I just wanted to
make sure that the original error was repeatable, and understood.
Comment 4 Cristian Gafton 1998-12-03 16:26:59 EST
The error comes from the bad header taht glibc installs; yes, crontab
will have to be rebuilt, but that does not change the fact that the
bug is in glibc.
Comment 5 rhaig 1998-12-03 19:27:59 EST
Comment 6 Bill Nottingham 1998-12-07 19:04:59 EST
*** Bug 335 has been marked as a duplicate of this bug. ***
Comment 7 Bill Nottingham 1998-12-10 10:50:59 EST
*** Bug 120 has been marked as a duplicate of this bug. ***
on a fresh install of redhat 5.2/intel

I have the following packages installed on a new 5.2 box.

[root@mail2 bin]# rpm -qa | egrep '(cron|vi)'

Note: when using crontab -e I get the following error:
[root@mail2 bin]# crontab -e
/bin/sh: /usr/bin/vi: No such file or directory
crontab: "/usr/bin/vi" exited with status 126
[root@mail2 bin]# rpm -ql vim-minimal
[root@mail2 bin]#

Note: vi has been put in /bin, and crontab expects it in


------- Additional Comments From jturner@redhat.com  12/10/98 09:13 -------
I need more information from you about the specific packages that you
installed besides the ones for cron and vi.  For example, did you do a
workstation install, or a custom, and if so, which packages did you
select.  In test lab I was unable to replicate your problem, as in
fresh install there was a symbolic link from /usr/bin/vi to /bin/vi.
Comment 8 rhaig 1998-12-10 11:41:59 EST
the fact that you have a symbolic link doesn't change the fact that
paths.h specifies the wrong path.  I consider the link to be a
work-around for this problem.  the problem has been identified as
paths.h in glibc.  if requested, I can produce the output of rpm -qa,
however my install.log is no longer around.
Comment 9 Cristian Gafton 1998-12-11 17:43:59 EST
Fixed in glibc 2.1 available in rawhide.

Will not backport to glibc 2.0 because -PATH_VI was a static string
and a number of apps will have to be recompiled for it. It is easier
to just recomment a symlink for /bin/vi  in /usr/bin

Or a symlink is provided in the vim-enhanced package
Comment 10 Bill Nottingham 1998-12-15 17:53:59 EST
*** Bug 120 has been marked as a duplicate of this bug. ***
edquota calls /usr/bin/vi, instead of /bin/vi.  There is no
EDIOR variable set.

------- Additional Comments From dkl@redhat.com  12/07/98 17:21 -------
I could not replicate this on a test system. There is a symbolic link
in /usr/bin/ named vi that points to the vim binary. Therefore I was
not able to get it to fail on a standard 5.2 installation.

------- Additional Comments From dlt@redhat.com  12/08/98 09:16 -------
I ran edquota on two systems.  If I set the environment variable,
EDITOR, to /bin/vi, edquota would work.  With the system as
distributed, this variable is not set, and edquota fails as it assumes
that /usr/bin/vi exists, which it doesn't in a default install.

------- Additional Comments From dlt@redhat.com  12/08/98 09:22 -------
jbj appears to be the owner of the quota package.
Comment 11 Bill Nottingham 1998-12-29 10:27:59 EST
*** Bug 120 has been marked as a duplicate of this bug. ***

vipw in RH5.2 is hard coded to fire up /usr/bin/vi
by default.  There is no /usr/bin/vi, so the command doesn't
work without workarounds.

vi is /bin/vi, so setting EDITOR to override the broken
default is one way around the problem.
Comment 12 Bill Nottingham 1999-01-05 11:19:59 EST
*** Bug 120 has been marked as a duplicate of this bug. ***

When using "custom" installation with default packages,
vim-enhanced does not get installed. vim-enhanced is needed
by "crontab" command though, w/o vim-enhanced, crontab
will fail with "/usr/bin/vi - command not found" error.
Fix: install vim-enhanced or set EDITOR environment var
correctly: "export EDITOR=/bin/vi"

Note You need to log in before you can comment on or make changes to this bug.