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正常使用。