Chinaunix首页 | 论坛 | 博客
  • 博客访问: 589449
  • 博文数量: 150
  • 博客积分: 1132
  • 博客等级: 少尉
  • 技术积分: 2067
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-11 16:46
文章分类

全部博文(150)

文章存档

2015年(15)

2014年(75)

2013年(4)

2012年(56)

分类: LINUX

2015-01-21 12:58:52

rpm -qp --scripts ABC-0.1-1.rpm
List the package specific scriptlet(s) that are used as part of the installation and uninstallation processes.

rpm -q(p) -R,--requires
rpm -q(p) --provides
rpm -q(p) --conflicts

安装或升级 rpm 时,如果在文件系统中碰到与 rpm 包中的文件相同的文件,会有三种可能:
1. 该相同的文件不属于任何 rpm 包所有,且没有在 rpm 包中被标识为 %config(noreplace) ,则直接覆盖;
2. 该相同的文件被其他另外的 rpm 包所有,则提示冲突并禁止安装或升级;
3. 该相同的文件不属于任何 rpm 包所有,且在 rpm 包中被标识为 %config(noreplace) ,则被安装为 .rpmnew 后缀的文件。
有的 rpm 包互相依赖,对于这样的安装包必须同时安装,方法为在 rpm 命令行上指定多个 rpm 包。

rpm -e [--allmatches] PACKAGE_NAME...
--allmatches:
Remove all versions of the package which match PACKAGE_NAME. Normally an error is issued if PACKAGE_NAME matches multiple packages.

INSTALL AND UPGRADE OPTIONS:
rpm -i/-U PACKAGE_FILE...
The PACKAGE_FILE may  be specified as an ftp or http URL, in which case the package will be downloaded before being installed.

查询:
rpm -q --qf '%{name}-%{version}-%{release}.%{arch}\n'  openssl

不安装 rpm 包,从 rpm 包中抽取文件:
rpm2cpio xxx.rpm | cpio -id

rpm -U --force xxx.rpm
如此强制升级 rpm 包可能会导致文件残留,残留的文件来自老版本的 rpm 包。现在残留的文件不属于任何 rpm 包。


阅读(1089) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~