查询ubuntu中的库属于哪个deb包并查询包版本

  • 查询ubuntu中的文件属于哪个deb包

使用 dpkg-query -S
1 查询resize2fs 文件

dpkg-query -S $(which resize2fs)
e2fsprogs: /sbin/resize2fs

2 查询libicuuc.so库所在包名称

 dpkg-query -S libicuuc.so.55
libicu55:arm64: /usr/lib/aarch64-linux-gnu/libicuuc.so.55.1
libicu55:arm64: /usr/lib/aarch64-linux-gnu/libicuuc.so.55

  • 查询libicu55包版本号等
apt show libicu55
Package: libicu55
Version: 55.1-7ubuntu0.4
Status: install ok installed
Priority: optional
Section: libs
Source: icu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Laszlo Boszormenyi (GCS) <gcs@debian.org>
Installed-Size: 30.8 MB
Depends: libc6 (>= 2.17), libgcc1 (>= 1:3.0), libstdc++6 (>= 5.2)
Homepage: http://www.icu-project.org
Download-Size: unknown
APT-Manual-Installed: no
APT-Sources: /var/lib/dpkg/status
Description: International Components for Unicode
 ICU is a C++ and C library that provides robust and full-featured
 Unicode and locale support.  This package contains the runtime
 libraries for ICU.

你可能感兴趣的:(ubuntu,linux)