Ubuntu apt-cache show命令查看lib库的版本信息

半世苍凉 提交于 2019-11-26 23:34:39

在写《Ubuntu14.04 安装VSCode 1.36.1版本 libnss3 (>= 2:3.26) 》时。

虽然已经安装成功VSCode 1.36.1, 其依赖库libnss3已经满足了2:3.26要求,但是我当时想知道究竟已经更新到什么版本了?

首先尝试了,apt-get install libnss3,发现其只是提示当前已经是最新版本。

但并未给出版本号。

user@swd:~$ sudo apt-get install libnss3
[sudo] password for user: 
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
libnss3 已经是最新的版本了。
libnss3 被设置为手动安装。
下列软件包是自动安装的并且现在不需要了:
  gir1.2-json-1.0 gir1.2-timezonemap-1.0 gir1.2-xkl-1.0 libdbusmenu-gtk4
  libmbim-glib0 libqmi-glib0 usb-modeswitch usb-modeswitch-data
Use 'apt-get autoremove' to remove them.
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 817 个软件包未被升级。
user@swd:~$ 

后来想使用--version来尝试,发现其不是个命令,无法这样查看。

user@swd:~$ libnss3 --version
libnss3:未找到命令
user@swd:~$ 

经过一番搜寻查问,发现要从apt-cache中去查找。

apt-cache show  libnss3

这个命令查看无须sudo获取root权限。

输出内容很详细。

user@swd:~$ apt-cache show  libnss3 
Package: libnss3
Architecture: amd64
Version: 2:3.28.4-0ubuntu0.14.04.5
Multi-Arch: same
Priority: optional
Section: libs
Source: nss
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Maintainers of Mozilla-related packages <pkg-mozilla-maintainers@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 3680
Pre-Depends: multiarch-support
Depends: libc6 (>= 2.14), libnspr4 (>= 2:4.12), libsqlite3-0 (>= 3.5.9), zlib1g (>= 1:1.1.4), libnss3-nssdb
Conflicts: libnss3-1d (<< 2:3.13.4-2)
Filename: pool/main/n/nss/libnss3_3.28.4-0ubuntu0.14.04.5_amd64.deb
Size: 1124032
MD5sum: 33e0b7c70386ce2d305ff95cb8d5e467
SHA1: 9f2db3311a52c6744642e3c87001468454b2c80d
SHA256: 6847131866f5dade685356715009ef67b6c0d7e30c62c62f99e4c66f122b1ca0
Homepage: http://www.mozilla.org/projects/security/pki/nss/
Description-en: Network Security Service libraries
 This is a set of libraries designed to support cross-platform development
 of security-enabled client and server applications. It can support SSLv2
 and  v4, TLS, PKCS #5, #7, #11, #12, S/MIME, X.509 v3 certificates and
 other security standards.
Description-md5: 8cae15b3c3c4e609abb7935ebf0d0f66
Task: virt-host, ubuntu-desktop, ubuntu-usb, tomcat-server, kubuntu-desktop, kubuntu-full, kubuntu-active, kubuntu-active-desktop, kubuntu-active-full, kubuntu-active, edubuntu-desktop, edubuntu-usb, xubuntu-desktop, mythbuntu-frontend, mythbuntu-desktop, mythbuntu-backend-slave, mythbuntu-backend-master, lubuntu-desktop, ubuntustudio-desktop, ubuntu-gnome-desktop
Supported: 5y

Package: libnss3
Priority: optional
Section: libs
Installed-Size: 3596
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Maintainers of Mozilla-related packages <pkg-mozilla-maintainers@lists.alioth.debian.org>
Architecture: amd64
Source: nss
Version: 2:3.15.4-1ubuntu7
Depends: libc6 (>= 2.14), libnspr4 (>= 2:4.9-2~) | libnspr4-0d (>= 4.8.6), libsqlite3-0 (>= 3.5.9), zlib1g (>= 1:1.1.4), libnss3-nssdb
Pre-Depends: multiarch-support
Conflicts: libnss3-1d (<< 2:3.13.4-2)
Filename: pool/main/n/nss/libnss3_3.15.4-1ubuntu7_amd64.deb
Size: 1080574
MD5sum: 27aa0c0652bfe05d16d12c20101b2302
SHA1: 05859eed54752e8b57a5dc5ca5df23b89c39ba86
SHA256: d91bfdacdbfd3dafe65c2047d59ee87302ddec36ade6dc2a2ea0186b77ea6b0b
Description-en: Network Security Service libraries
 This is a set of libraries designed to support cross-platform development
 of security-enabled client and server applications. It can support SSLv2
 and  v4, TLS, PKCS #5, #7, #11, #12, S/MIME, X.509 v3 certificates and
 other security standards.
Description-md5: 8cae15b3c3c4e609abb7935ebf0d0f66
Multi-Arch: same
Homepage: http://www.mozilla.org/projects/security/pki/nss/
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 5y
Task: virt-host, ubuntu-desktop, ubuntu-usb, tomcat-server, kubuntu-desktop, kubuntu-full, kubuntu-active, kubuntu-active-desktop, kubuntu-active-full, kubuntu-active, edubuntu-desktop, edubuntu-usb, xubuntu-desktop, mythbuntu-frontend, mythbuntu-desktop, mythbuntu-backend-slave, mythbuntu-backend-master, lubuntu-desktop, ubuntustudio-desktop, ubuntu-gnome-desktop

user@swd:~$ 

 

[小结]

此篇文档,最重要的就是apt-cache show这个命令,特此以记之。

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!