如何查看rpm包的依赖性?

时间:2019-11-20 08:53:35  来源:igfitidea点击:

如何查看rpm软件包的相关依赖包?
RPM是一个软件包管理器,用于安装卸载,验证,查询和更新Linux软件包。

查看rpm文件的依赖性

语法:

rpm -qpR {.rpm-file} rpm -qR {package-name}

查看rpm文件具有哪些依赖性:

# rpm -qpR watermask-1.4rc1-4.i586.rpm

输出示例:

mod_php
php-session
php-gettext
php-zlib
php-mysql
ImageMagick-Magick++
tetex
cjk-latex
rpmlib(PayloadFilesHavePrefix)

查看软件包的依赖性列表:

# rpm -ivh watermask-1.4rc1-4.i586.rpm

输出:

error: Failed dependencies:
   mod_php is needed by watermask-1.4rc1-4
   php-session is needed by watermask-1.4rc1-4
   php-gettext is needed by watermask-1.4rc1-4
   php-zlib is needed by watermask-1.4rc1-4
   php-mysql is needed by watermask-1.4rc1-4
   ImageMagick-Magick++ is needed by watermask-1.4rc1-4
   tetex is needed by watermask-1.4rc1-4
   cjk-latex is needed by watermask-1.4rc1-4