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

在寫《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 <[email protected]>
Original-Maintainer: Maintainers of Mozilla-related packages <[email protected]>
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 <[email protected]>
Original-Maintainer: Maintainers of Mozilla-related packages <[email protected]>
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這個命令,特此以記之。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章