Linux使用錯誤小結(CentOS)- vim安裝問題: Error: Nothing to do__Linux

來源:互聯網
上載者:User

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


相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.