免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 943 | 回复: 0
打印 上一主题 下一主题

yum [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-10-12 16:25 |只看该作者 |倒序浏览
在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


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/76526/showart_2068538.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP