wiki:docs/vl7/cui-guide/package-management/apt-show

Version 1 (modified by yasumichi, 11 years ago) (diff)

--

Vine Linux ドキュメント / Vine Linux 7.x / CUI ユーザーズガイド / プログラムの追加・削除・更新(パッケージ管理) / apt-cache コマンドによるパッケージ情報の表示

apt-cache コマンドによるパッケージ情報の表示

パッケージの情報を知りたい場合は、apt-cache コマンドを用います。

man apt-cache や apt-cache --help で使い方を見ることができます。

まず、gencaches で情報を収集しておきます。

$ sudo apt-cache gencaches

apt-get コマンドで update, upgrade, install, remove などを実行した場合には apt-cache gencaches と同じ処理が行われるので、apt-cache gencaches を頻繁に実行する必要はありません。

個別のパッケージ情報を知りたい場合は、apt-cache show (パッケージ名)を用います。apt 自身の場合、以下のように表示されます。

$ apt-cache show apt
Package: apt
Section: Applications/Administration
Installed Size: 2523758
Packager: Daisuke SUZUKI <daisuke@linux.or.jp>
Version: 0.5.15lorg3.2-0vl8.1
Pre-Depends: fileutils, ldconfig, sed, /bin/sh, /bin/sh
Depends: rpm >= 4.0.4, gnupg, bzip2, readline >= 4.3, vine-keyring, /bin/sh, /bi
n/sh, libapt-pkg-libc6.3-5.so.2, libbz2.so.1, libc.so.6, libc.so.6(GLIBC_2.0), l
ibc.so.6(GLIBC_2.1), libc.so.6(GLIBC_2.1.3), libc.so.6(GLIBC_2.2), libc.so.6(GLI
BC_2.2.3), libc.so.6(GLIBC_2.3), libc.so.6(GLIBC_2.3.4), libdl.so.2, libdl.so.2(
GLIBC_2.0), libdl.so.2(GLIBC_2.1), libgcc_s.so.1, libgcc_s.so.1(GCC_3.0), libm.s
o.6, libm.so.6(GLIBC_2.0), libncurses.so.5, libpopt.so.0, libreadline.so.5, libr
pm-4.4.so, librpmdb-4.4.so, librpmio-4.4.so, libstdc++.so.5, libstdc++.so.5(GLIB
CPP_3.2), libxml2.so.2, libz.so.1
Provides: libapt-pkg-libc6.3-5.so.2, apt = 0.5.15lorg3.2-0vl8.1
Architecture: i386
Size: 1007108
MD5Sum: e250f6a02202d097fb536b19c3d494f9
Filename: apt-0.5.15lorg3.2-0vl8.1.i386.rpm
Summary: RPM を扱える Debian のパッケージツール apt(Advanced Packaging Tool)
Description: 
 これはrpm対応の apt です。 apt-getは簡単かつ安全にパッケージ
 のアップグレード,インストールがおこなえるコマンドです。
 apt は依存関係の解決、インストール順序の補完などさまざまな特
 徴があります。

Group: Applications/Administration であるべきところが Section: Applications/Administration となっていますが、これは現在の仕様です。

パッケージの依存関係などを知りたい場合は、apt-cache showpkg (パッケージ名) を用います。

$ apt-cache showpkg apt
Package: apt
Versions: 
0.5.15lorg3.2-0vl8.1.i386(/var/state/apt/lists/Vine%20Linux%204.1_Vine_base_pkgl
ist.main)(/var/lib/rpm/Packages)
0.5.15lorg3.2-0vl7.i386(/var/state/apt/lists/updates.vinelinux.org_apt_4.1_i386_
base_pkglist.main)

Reverse Depends: 
  tiny-buildfarm,apt 0.3.19.cnc.52
  cron-apt,apt
  apt-listchanges,apt 0.5.4.cnc.9
  apt-cron,apt
  synaptic,apt 0.5.15lorg3.2-0vl7
  apt-devel,apt 0.5.15lorg3.2-0vl7
  synaptic,apt 0.5.5
Dependencies: 
0.5.15lorg3.2-0vl8.1 - fileutils (0 (null)) ldconfig (0 (null)) sed (0 (null)) r
pm (2 4.0.4) gnupg (2 (null)) bzip2 (2 (null)) readline (2 4.3) vine-keyring (2 
(null)) /bin/sh (2 (null)) /bin/sh (2 (null)) /bin/sh (2 (null)) /bin/sh (2 (nul
l)) libapt-pkg-libc6.3-5.so.2 (2 (null)) libbz2.so.1 (2 (null)) libc.so.6 (2 (nu
ll)) libc.so.6(GLIBC_2.0) (2 (null)) libc.so.6(GLIBC_2.1) (2 (null)) libc.so.6(G
LIBC_2.1.3) (2 (null)) libc.so.6(GLIBC_2.2) (2 (null)) libc.so.6(GLIBC_2.2.3) (2
 (null)) libc.so.6(GLIBC_2.3) (2 (null)) libc.so.6(GLIBC_2.3.4) (2 (null)) libdl
.so.2 (2 (null)) libdl.so.2(GLIBC_2.0) (2 (null)) libdl.so.2(GLIBC_2.1) (2 (null
)) libgcc_s.so.1 (2 (null)) libgcc_s.so.1(GCC_3.0) (2 (null)) libm.so.6 (2 (null
)) libm.so.6(GLIBC_2.0) (2 (null)) libncurses.so.5 (2 (null)) libpopt.so.0 (2 (n
ull)) libreadline.so.5 (2 (null)) librpm-4.4.so (2 (null)) librpmdb-4.4.so (2 (n
ull)) librpmio-4.4.so (2 (null)) libstdc++.so.5 (2 (null)) libstdc++.so.5(GLIBCP
P_3.2) (2 (null)) libxml2.so.2 (2 (null)) libz.so.1 (2 (null)) 
0.5.15lorg3.2-0vl7 - fileutils (0 (null)) ldconfig (0 (null)) sed (0 (null)) rpm
 (2 4.0.4) gnupg (2 (null)) bzip2 (2 (null)) readline (2 4.3) vine-keyring (2 (n
ull)) /bin/sh (2 (null)) /bin/sh (2 (null)) /bin/sh (2 (null)) /bin/sh (2 (null)
) libapt-pkg-libc6.3-5.so.2 (2 (null)) libbz2.so.1 (2 (null)) libc.so.6 (2 (null
)) libc.so.6(GLIBC_2.0) (2 (null)) libc.so.6(GLIBC_2.1) (2 (null)) libc.so.6(GLI
BC_2.1.3) (2 (null)) libc.so.6(GLIBC_2.2) (2 (null)) libc.so.6(GLIBC_2.2.3) (2 (
null)) libc.so.6(GLIBC_2.3) (2 (null)) libc.so.6(GLIBC_2.3.4) (2 (null)) libdl.s
o.2 (2 (null)) libdl.so.2(GLIBC_2.0) (2 (null)) libdl.so.2(GLIBC_2.1) (2 (null))
 libgcc_s.so.1 (2 (null)) libgcc_s.so.1(GCC_3.0) (2 (null)) libm.so.6 (2 (null))
 libm.so.6(GLIBC_2.0) (2 (null)) libncurses.so.5 (2 (null)) libpopt.so.0 (2 (nul
l)) libreadline.so.5 (2 (null)) librpm-4.4.so (2 (null)) librpmdb-4.4.so (2 (nul
l)) librpmio-4.4.so (2 (null)) libstdc++.so.5 (2 (null)) libstdc++.so.5(GLIBCPP_
3.2) (2 (null)) libxml2.so.2 (2 (null)) libz.so.1 (2 (null)) 
Provides: 
0.5.15lorg3.2-0vl8.1 - apt libapt-pkg-libc6.3-5.so.2 
0.5.15lorg3.2-0vl7 - apt libapt-pkg-libc6.3-5.so.2 
Reverse Provides: 
apt 0.5.15lorg3.2-0vl7
apt 0.5.15lorg3.2-0vl8.1

ソースパッケージの情報を知りたい場合は、apt-cache showsrc (パッケージ名) を用います。

一般的に package-devel-(バージョン)-(リリース番号).(アーキテクチャ).rpm のソースパッケージは package-(バージョン)-(リリース番号).src.rpm ですが、このように -(バージョン) より前の部分の名前が異なる場合は showsrc では表示されません。

$ apt-cache showsrc apt
Package: apt
Section: Applications/Administration
Installed Size: 1119612
Packager: Daisuke SUZUKI <daisuke@linux.or.jp>
Version: 0.5.15lorg3.2-0vl8.1
Architecture: i386
Size: 1042699
MD5Sum: a670ca043b1668c96e6f5d7496c08047
Filename: apt-0.5.15lorg3.2-0vl7.src.rpm
Summary: RPM を扱える Debian のパッケージツール apt(Advanced Packaging Tool)
Description: 
 これはrpm対応の apt です。 apt-getは簡単かつ安全にパッケージ
 のアップグレード,インストールがおこなえるコマンドです。
 apt は依存関係の解決、インストール順序の補完などさまざまな特
 徴があります。