Re: /usr/bin/editor missing: update-alternatives problem?
On Thu, Aug 26, 2004 at 02:35:36PM -0700, Ross Boylan wrote:
> Somehow /usr/bin/editor got deleted, and this is causing problems
> upgrading many of my editors.
>
> I first saw this with vim
> (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=267095) a week ago,
> but it's since bit me with many others (I track testing).
>
> I suspect this has something to do with the fact that, in an effort to
> make emacs my default text editor, I pointed editor at
> /etc/alternatives/emacs (rather than a "real" binary):
> # update-alternatives --display editor
> editor - status is auto.
> link currently points to /etc/alternatives/emacs
> /usr/bin/emacs21 - priority 0
> /bin/ed - priority -100
> slave editor.1.gz: /usr/share/man/man1/ed.1.gz
> /usr/bin/nvi - priority 19
> slave editor.1.gz: /usr/share/man/man1/nvi.1.gz
> /usr/bin/vim - priority 120
> slave editor.1.gz: /usr/share/man/man1/vim.1.gz
> /bin/nano - priority 40
> slave editor.1.gz: /usr/share/man/man1/nano.1.gz
> /etc/alternatives/emacs - priority 150
> slave editor.1.gz: /etc/alternatives/emacs.1.gz
> Current `best' version is /etc/alternatives/emacs.
>
> (That was from before /usr/bin/editor vanished, though I see about the
> same output now).
>
> I suspect the real problem is not vim, but either that I have used
> update-alternatives improperly, or that it has a bug.
>
> Can anyone shed any light on this, or even on whether I should reassign
> the bug elsewhere (dpkg?)?
Which /usr/bin/editor?
~/linux-2.6.0/drivers/scsi/aic7xxx %% ls -l /usr/bin/editor /etc/alternatives/editor
lrwxrwxrwx 1 root root 12 Oct 4 2003 /etc/alternatives/editor -> /usr/bin/vim
lrwxrwxrwx 1 root root 24 Aug 2 2003 /usr/bin/editor -> /etc/alternatives/editor
~/linux-2.6.0/drivers/scsi/aic7xxx %%
Which of those two files is missing? The second you can recreate easily:
ln -s /etc/alternatives/editor /usr/bin/editor
The first you could probably do:
update-alternatives --auto editor
Did you say you pointed /usr/bin/editor at /etc/alternatives/emacs?
Don't do that. Instead, restore the link to /etc/alternatives/editor,
and:
update-alternatives --config editor
Select emacs from the list.
(Warning: I am an emacs-hater, I may have subconsiously sabotaged the
directions...)
Reply to: