LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   update-alternatives: error: unable to read link `/etc/alternatives/editor': Invalid a (https://www.linuxquestions.org/questions/debian-26/update-alternatives-error-unable-to-read-link-%60-etc-alternatives-editor-invalid-a-4175488094/)

ccc 12-16-2013 01:40 AM

update-alternatives: error: unable to read link `/etc/alternatives/editor': Invalid a
 
Hi

I have Wheezy with LXDE installed.
If I try to set default text editor, then I get this error:
Code:

# update-alternatives --config editor
update-alternatives: error: unable to read link `/etc/alternatives/editor': Invalid argument

Knows anyone how to solve this?

ccc 12-16-2013 01:51 AM

I have deleted the following file:
Code:

# rm /etc/alternatives/editor
and now it seems to work:
Code:

# update-alternatives --config editor
There are 3 choices for the alternative editor (providing /usr/bin/editor).

  Selection    Path                Priority  Status
------------------------------------------------------------
  0            /bin/nano            40        auto mode
  1            /bin/nano            40        manual mode
  2            /usr/bin/vim.basic  30        manual mode
  3            /usr/bin/vim.tiny    10        manual mode

Press enter to keep the current choice[*], or type selection number:



All times are GMT -5. The time now is 03:15 PM.