在rhel4中默认不支持yum命令,但rhel5中默认支持.
命令行工具yum提供了一种在系统中管理软件包的简易方法:
#yum install firefox
这个命令会在一个配置的库中搜索一个叫做"firefox"的软件包,如果找到了,它就会安装其最新版本,并安装其它满足依赖关系的必要条件.
#yum remove mypackage
这个命令会试图从您的系统中删除叫做"mypackage"的软件包.如果其它软件包依赖于"mypackage",yum就会为您提示这一点,并让您能够把依赖于它的那些软件包也一并删除.
#yum update [mypackage..]
如果命令行中指定了软件包,yum会在配置的库中搜索这些软件包的更新版本并安装它们.如果命令行中没有指定软件包,yum会搜索您目前安装的所有软件包的更新版本.
[root@rhel ~]# rpm -qa|grep vim-common
vim-common-7.0.109-3
[root@rhel ~]# rpm -e vim-common
error: Failed dependencies:
vim-common = 2:7.0.109-3 is needed by (installed) vim-enhanced-7.0.109-3.i386
[root@rhel ~]# rpm -q vim-enhanced
vim-enhanced-7.0.109-3
[root@rhel ~]# yum remove vim-common
Loading "installonlyn" plugin
Loading "rhnplugin" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Remove Process
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package vim-common.i386 2:7.0.109-3 set to be erased
--> Running transaction check
Setting up repositories
No Repositories Available to Set Up
Reading repository metadata in from local files
--> Processing Dependency: vim-common = 2:7.0.109-3 for package: vim-enhanced
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package vim-enhanced.i386 2:7.0.109-3 set to be erased
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Removing:
vim-common i386 2:7.0.109-3 installed 15 M
Removing for dependencies:
vim-enhanced i386 2:7.0.109-3 installed 2.6 M
Transaction Summary
=============================================================================
Install 0 Package(s)
Update 0 Package(s)
Remove 2 Package(s)
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Removing : vim-common ######################### [1/2]
Removing : vim-enhanced ######################### [2/2]
Removed: vim-common.i386 2:7.0.109-3
Dependency Removed: vim-enhanced.i386 2:7.0.109-3
Complete!
[root@rhel ~]#
[root@rhel Server]# ls|grep vim-enhanced-7.0.109-3.i386.rpm
vim-enhanced-7.0.109-3.i386.rpm
[root@rhel Server]# rpm -ivh vim-enhanced-7.0.109-3.i386.rpm
warning: vim-enhanced-7.0.109-3.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: Failed dependencies:
vim-common = 2:7.0.109-3 is needed by vim-enhanced-7.0.109-3.i386
阅读(948) | 评论(0) | 转发(0) |