Linux: Display rpm package architecture

Linux: Display rpm package architecture

by Vivek Gite on September 11, 2007 · 0 comments

Q. I’m using CentOS on 64 bit Linux. How do I find out rpm package architecture before installation such as i386 or x86_64 bit?

A. Almost each rpm package has i386 or x86_64 added to file extension. However some time you may see filename such as file-version.rpm. You can list all installed rpm packages with rpm -qa command but it will not display architecture. You can run following command to display rpm package architecture:
rpm -qa --qf "%{n}-%{arch}/n"
Ouput:

filesystem-x86_64
comps-extras-noarch
gnome-mime-data-x86_64
glibc-x86_64
atk-x86_64
libICE-x86_64
db4-x86_64
elfutils-libelf-x86_64
ncurses-x86_64
libsepol-x86_64
libcap-x86_64
sqlite-x86_64
pcre-x86_64
gdbm-x86_64
libsepol-i386
libXdmcp-x86_64
db4-i386
iptables-x86_64
libXrender-x86_64
libXi-x86_64
xorg-x11-font-utils-x86_64
slang-x86_64
libXpm-x86_64
startup-notification-x86_64
gzip-x86_64
libIDL-x86_64
libXau-i386
wireless-tools-x86_64
libvorbis-x86_64

Another option is to use following command to display detailed information about package:
rpm -qi {package-name}
If you wish to display package version along with architecture, enter:
rpm -qa --qf "%{n}-%{v}-%{r}.%{arch}/n" | less
Run rpm command to print a list of all of the tags it knows about when it is invoked with the --querytags argument.
rpm --querytags | less

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值