My os info:
uname -a
Linux mydebian 4.19.0-14-amd64 #1 SMP Debian 4.19.171-2 (2021-01-30) x86_64 GNU/Linux
There is no /usr/share/vim
in the os,it is my first time(never install before) to install vim with command:
sudo apt install vim
Now enter into vim ,type scriptnames
in ex mode ,i get info:
1: /usr/share/vim/vim81/defaults.vim
2: /usr/share/vim/vim81/syntax/syntax.vim
3: /usr/share/vim/vim81/syntax/synload.vim
4: /usr/share/vim/vim81/syntax/syncolor.vim
5: /usr/share/vim/vim81/filetype.vim
6: /usr/share/vim/vim81/ftplugin.vim
7: /usr/share/vim/vim81/indent.vim
8: /usr/share/vim/vim81/plugin/getscriptPlugin.vim
9: /usr/share/vim/vim81/plugin/gzip.vim
10: /usr/share/vim/vim81/plugin/logiPat.vim
11: /usr/share/vim/vim81/plugin/manpager.vim
12: /usr/share/vim/vim81/plugin/matchparen.vim
13: /usr/share/vim/vim81/plugin/netrwPlugin.vim
14: /usr/share/vim/vim81/plugin/rrhelper.vim
15: /usr/share/vim/vim81/plugin/spellfile.vim
16: /usr/share/vim/vim81/plugin/tarPlugin.vim
17: /usr/share/vim/vim81/plugin/tohtml.vim
18: /usr/share/vim/vim81/plugin/vimballPlugin.vim
19: /usr/share/vim/vim81/plugin/zipPlugin.vim
vim
is installed entirely.
To remove the vim and updatedb and remove directory /usr/share/vim
manually.
sudo apt remove vim
sudo updatedb
sudo rm -rf /usr/share/vim
#or
sudo apt remove vim
sudo rm -rf /usr/share/vim
sudo updatedb
#the order is un-related,i have maken the experiment.
Now install vim the same way as first time to do:
sudo apt install vim
Enter into vim and type :scriptnames
in ex mode,i get nothing shown.
ls /usr/share/vim
ls: cannot access '/usr/share/vim': No such file or directory
vim
is installed partly.
As duthils
point out in the webpage
fix the issue
apt install --reinstall vim-runtime
can fix the issue.
Yes!I have verified that for the second time installation (after to remove the vim and updatedb and remove directory /usr/share/vim
manually)
sudo apt install vim
sudo apt install --reinstall vim-runtime
Or
sudo apt install vim-runtime vim
In the explanation:It seems that your directory /usr/share/vim
was manually deleted (it is "not found" but still referenced by your original locate),it is true in my case,why updatedb
can't cancel the reference by locate
?How to cancel the reference properly by locate
?
I want a pure functional way,same input same output,it is unacceptable to install same package vim
with two different commands.
duthils
help me to installvim
,but i want a way to fix the package management system.sudo updatedb
can't restore my os into previous status?