Yum (yellowdog Updater modified) is a set of Linux software for searching, installing, updating, and deleting programs. It runs on a Linux release version compatible with the RPM package, such as RedHat,
Fedora, Suse,
Centos, mandriva.
Today, the following error occurs when I install centos 5.5 using the yum command:
[root@malu2 ~]# yum install vim
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.hosting90.cz
* extras: mirror.hosting90.cz
* updates: mirror.hosting90.cz
Setting up Install Process
No package vim available.
Nothing to do
For this error, I usually habitually update the yum repository first:
#yum -y update
Run the installation again and find that the error persists. It seems that this method of package name guessing is not applicable. Therefore, you can use the yum search parameter to list the vim-related package names:
[root@malu2 yum.repos.d]# yum search vim
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.hosting90.cz
* extras: mirror.hosting90.cz
* updates: mirror.hosting90.cz
===================== Matched: vim ===================
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-minimal.x86_64 : A minimal version of the VIM editor.
Through viewing, we can see that Yum lists the detailed vim-related package names, so that we can smoothly install VIM:
#yum -y install vim-enhanced.x86_64
The preceding command is successfully executed. Of course, not only is Vim installed, but other programs, such as MySQL, also only need to perform the yum search first and then install it by matching the detailed package name. The above error will not occur.