yum (Yellowdog Updater Modified)是一个集与查找,安装,更新和删除程序的Linux软件。
它运行在RPM包兼容的Linux发行版本上,如:RedHat, Fedora, SUSE,CentOS,
Mandriva。
问题1:
No package vimrc available. Error: Nothing to do
解决这个一连串问题的时候:请备份libperl.so(必须):
[root@localhost CORE]# pwd
/usr/lib64/perl5/CORE
[root@localhost CORE]# cp -R libperl.so /home/
-------------------------------------------------------------------------------------------
[root@localhost etc]# yum -y install vim*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.bit.edu.cn
* extras: mirrors.yun-idc.com
* updates: mirrors.opencas.cn
No package vimrc available.
Error: Nothing to do
查看yum服务上的安装包:
[root@localhost etc]# yum list | grep vim
vim-X11.x86_64 2:7.4.160-1.el7 @/
vim-common.x86_64 2:7.4.160-1.el7 @/
vim-enhanced.x86_64 2:7.4.160-1.el7 @/
vim-filesystem.x86_64 2:7.4.160-1.el7 @/
vim-minimal.x86_64 2:7.4.160-1.el7 @anaconda
golang-vim.noarch 1.3.3-3.el7 base
更新yum仓库:
[root@localhost etc]# yum -y update
******************
通过yum的查找参数来列出VIM相关的包名:
[root@localhost etc]# yum search vim
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.bit.edu.cn
* extras: mirror.bit.edu.cn
* updates: mirrors.opencas.cn
============= N/S matched: vim =======================
golang-vim.noarch : Vim plugins for Go
vim-X11.x86_64 : The VIM version of the vi editor for the X Window System
vim-common.x86_64 : The common files needed by any version of the VIM editor
vim-enhanced.x86_64 : A version of the VIM editor which includes recent enhancements
vim-filesystem.x86_64 : VIM filesystem layout
vim-minimal.x86_64 : A minimal version of the VIM editor
Name and summary matches only, use "search all" for everything.
解决1:yum install -y vim-enhanced.x86_64
问题1未解决进入问题2:
[root@localhost etc]# yum install -y vim-enhanced.x86_64
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.bit.edu.cn
* extras: mirrors.yun-idc.com
* updates: mirrors.opencas.cn
Package 2:vim-enhanced-7.4.160-1.el7.x86_64 already installed and latest version
Nothing to do
解决:
[root@localhost etc]# rpm -qa | grep -i vim
vim-X11-7.4.160-1.el7.x86_64
vim-common-7.4.160-1.el7.x86_64
vim-enhanced-7.4.160-1.el7.x86_64
vim-filesystem-7.4.160-1.el7.x86_64
vim-minimal-7.4.160-1.el7.x86_64
[root@localhost etc]# rpm -e vim-minimal-7.4.160-1.el7.x86_64
[root@localhost etc]# rpm -e --nodeps vim-minimal-7.4.160-1.el7.x86_64
……全部卸载。
注意:
rpm -e vimxxx //普通删除模式
rpm -e --nodeps vimxxx // 强力删除模式,如果使用上面命令删除时,提示有依赖的其它文件,则用该命令可以对其进行强力删除,可能会导致意外错误,系统破坏。
[root@localhost etc]# cd /etc/
[root@localhost etc]# rm -rf vimrc.rpmsave
然后:
[root@localhost CORE]# yum -y install vim*
log……
安装成功。
运行检查:
[root@localhost etc]# vim
vim: error while loading shared libraries: /usr/lib64/perl5/CORE/libperl.so: file too short
此时,libperl.so备份文件,还原就可以,操作导致libperl.so为空,所以还原后。就解决完成,vim正常使用。