dpkg -s
は、引数としてファイルまたはプログラムではなくパッケージ名を使用します。 (多くの場合、プログラムがそれを提供したパッケージと同じ名前を持つことになります。)
例えば、私のUbuntuシステム、dpkg -s gcc
プリント上:CentOSのシステムで
Package: gcc
Status: install ok installed
Priority: optional
Section: devel
Installed-Size: 64
Maintainer: Ubuntu Developers <[email protected]>
Architecture: i386
Source: gcc-defaults (1.98ubuntu3)
Version: 4:4.5.2-1ubuntu3
Provides: c-compiler
Depends: cpp (>= 4:4.5.2-1ubuntu3), gcc-4.5 (>= 4.5.2-1~)
Recommends: libc6-dev | libc-dev
Suggests: gcc-multilib, make, manpages-dev, autoconf, automake1.9, libtool, flex, bison, gdb, gcc-doc
Conflicts: gcc-doc (<< 1:2.95.3)
Description: The GNU C compiler
This is the GNU C compiler, a fairly portable optimizing compiler for C.
.
This is a dependency package providing the default GNU C compiler.
Original-Maintainer: Debian GCC Maintainers <[email protected]>
、rpm -q gcc
版画:
gcc-4.1.2-50.el5
それはできるだけ多くの情報を印刷しませんが、あなたがやっているすべてのパッケージがインストールされているかどうかチェックしている場合、それは大丈夫でなければなりません。詳細やその他のオプションが必要な場合は、man rpm
;他のクエリも利用できます。
rpm -q snmpd
がpackage snmpd is not installed
と表示される場合は、必要な情報に過ぎません。
dpkg -s
とrpm -q
の両方が終了ステータスを設定し、パッケージがインストールされていない場合はエラーを報告します。