Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

apt-get vim-tiny

95 views
Skip to first unread message

OS

unread,
Feb 14, 2016, 2:00:05 PM2/14/16
to
Any time I do anything with apt-get, it ends with an error code (1). It seems to have something to do with vim-tiny and I would like some help fixing it.

mark@FrogBreath:~$ dpkg --list vim-tiny
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
rF vim-tiny 2:7.4.488-7 amd64 Vi IMproved - enhanced vi editor
mark@FrogBreath:~$

mark@FrogBreath:~$ sudo apt-get remove vim.tiny
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'vim-tiny' for regex 'vim.tiny'
The following packages will be REMOVED:
vim-tiny
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 1,076 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 216384 files and directories currently installed.)
Removing vim-tiny (2:7.4.488-7) ...
update-alternatives: error: unable to read link `/etc/alternatives/vi': Invalid argument
dpkg: error processing package vim-tiny (--remove):
subprocess installed pre-removal script returned error exit status 2
update-alternatives: error: unable to read link `/etc/alternatives/vi': Invalid argument
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
vim-tiny
E: Sub-process /usr/bin/dpkg returned an error code (1)
mark@FrogBreath:~$

Thomas Schmitt

unread,
Feb 14, 2016, 2:50:06 PM2/14/16
to
Hi,

OS wrote:
> Any time I do anything with apt-get, it ends with an error code (1). It
> seems to have something to do with vim-tiny

You did not show such an "anything" attempt. So it is hard to
tell whether vim.tiny really is to blame.


> mark@FrogBreath:~$ sudo apt-get remove vim.tiny
> ...
> update-alternatives: error: unable to read link `/etc/alternatives/vi':

There is supposed to be a symbolic link with that name, which
points to one of the various /usr/bin/vim.* programs.
On my Debian 8:

/etc/alternatives/vi -> /usr/bin/vim.basic

choosing between

/usr/bin/vim.basic
/usr/bin/vim.tiny


I'd check what kind of file is behind that path

ls -ld /etc/alternatives/vi

If it is missing indeed, i'd check which /usr/bin/vim.* are present

ls -ld /usr/bin/vim.*

and then create a link to one of them

sudo ln -s /usr/bin/vim.basic /etc/alternatives/vi

If /etc/alternatives/vi exists, the further action depends on what
file type it is. Normally one would remove or rename it and then
create a link by ln -s as described above.


Then i would test whether the "do anything" problems still occur.
The proper existence or non-existence of vim-tiny should not interfere
with unrelated apt-get operations.


Have a nice day :)

Thomas

Mark Aldrich

unread,
Feb 17, 2016, 1:50:05 PM2/17/16
to
On Sun, 14 Feb 2016 20:48:30 +0100
"Thomas Schmitt scdbackup-at-gmx.net |Debian/Computer|"
Thank you Thomas.

As far as "do anything" is concerned, I will try to supply more complete
examples in the future.

It turns out that "/etc/alternatives/vi" was an executable and
"/usr/bin/vim.*" revealed only vim.tiny and vim.tutor. I moved vi to
vi.bak and created a link as you suggested to vim.tiny. I ran

sudo apt-get update

and any my problem "seemed" to have disappeared. I have
since run

sudo apt-get upgrade vim

and did not get the error message. Yea! Instead I now have vim.tiny and
vim.basic and the link previously discussed now points to vim.basic.

Again, I thank you for your assistance.
0 new messages