溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

怎么在Linux上檢查一個(gè)軟件包的詳細(xì)信息

發(fā)布時(shí)間:2021-10-23 11:03:13 來源:億速云 閱讀:106 作者:小新 欄目:系統(tǒng)運(yùn)維

小編給大家分享一下怎么在Linux上檢查一個(gè)軟件包的詳細(xì)信息,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!

YUM 命令:在 RHEL 和 CentOS 系統(tǒng)上獲得包的信息

YUM 英文直譯是“黃狗更新器–修改版Yellowdog Updater, Modified”,它是一個(gè)開源的基于命令行的包管理器前端實(shí)用工具。它被廣泛應(yīng)用在基于 RPM 的系統(tǒng)上,例如:RHEL 和 CentOS。

Yum 是用于在官方發(fā)行版?zhèn)}庫(kù)以及其他第三方發(fā)行版?zhèn)}庫(kù)下獲取、安裝、刪除、查詢 RPM 包的主要工具。

(LCTT 譯注:用 yum info 獲取 python 包的信息)

# yum info pythonLoaded plugins: fastestmirror, securityLoading mirror speeds from cached hostfile * epel: epel.mirror.constant.comInstalled PackagesName        : pythonArch        : x86_64Version     : 2.6.6Release     : 66.el6_8Size        : 78 kRepo        : installedFrom repo   : updatesSummary     : An interpreted, interactive, object-oriented programming languageURL         : http://www.python.org/License     : PythonDescription : Python is an interpreted, interactive, object-oriented programming            : language often compared to Tcl, Perl, Scheme or Java. Python includes            : modules, classes, exceptions, very high level dynamic data types and            : dynamic typing. Python supports interfaces to many system calls and            : libraries, as well as to various windowing systems (X11, Motif, Tk,            : Mac and MFC).            :            : Programmers can write new built-in modules for Python in C or C++.            : Python can be used as an extension language for applications that need            : a programmable interface.            :            : Note that documentation for Python is provided in the python-docs            : package.            :            : This package provides the "python" executable; most of the actual            : implementation is within the "python-libs" package.

YUMDB 命令:查看 RHEL 和 CentOS 系統(tǒng)上的包信息

yumdb info 這個(gè)命令提供與 yum info 相類似的的信息,不過它還額外提供了諸如包校驗(yàn)值、包類型、用戶信息(由何人安裝)。從 yum 3.2.26 版本后,yum 開始在 rpm 數(shù)據(jù)庫(kù)外儲(chǔ)存額外的信息了(此處如顯示 user 表明該包由用戶安裝,而 dep 說明該包是被作為被依賴的包而被安裝的)。

(LCTT 譯注:用 yumdb info 來獲取 python 包的信息)

# yumdb info pythonLoaded plugins: fastestmirrorpython-2.6.6-66.el6_8.x86_64     changed_by = 4294967295     checksum_data = 53c75a1756e5b4f6564c5229a37948c9b4561e0bf58076bd7dab7aff85a417f2     checksum_type = sha256     command_line = update -y     from_repo = updates     from_repo_revision = 1488370672     from_repo_timestamp = 1488371100     installed_by = 4294967295     reason = dep     releasever = 6

RPM 命令:在 RHEL/CentOS/Fedora 系統(tǒng)上查看包的信息

RPM 英文直譯為“紅帽包管理器Red Hat Package Manager”,這是一個(gè)在 RedHat 以及其變種發(fā)行版(如RHEL、CentOS、Fedora、openSUSE、Megeia)下的功能強(qiáng)大的命令行包管理工具。它能讓你輕松的安裝、升級(jí)、刪除、查詢以及校驗(yàn)?zāi)愕南到y(tǒng)或服務(wù)器上的軟件。RPM 文件以 .rpm 結(jié)尾。RPM 包由它所依賴的軟件庫(kù)以及其他依賴構(gòu)成,它不會(huì)與系統(tǒng)上已經(jīng)安裝的包沖突。

(LCTT 譯注:用 rpm -qi 查詢 nano 包的具體信息)

# rpm -qi nanoName        : nano                         Relocations: (not relocatable)Version     : 2.0.9                             Vendor: CentOSRelease     : 7.el6                         Build Date: Fri 12 Nov 2010 02:18:36 AM ESTInstall Date: Fri 03 Mar 2017 08:57:47 AM EST      Build Host: c5b2.bsys.dev.centos.orgGroup       : Applications/Editors          Source RPM: nano-2.0.9-7.el6.src.rpmSize        : 1588347                          License: GPLv3+Signature   : RSA/8, Sun 03 Jul 2011 12:46:50 AM EDT, Key ID 0946fca2c105b9dePackager    : CentOS BuildSystem URL         : http://www.nano-editor.orgSummary     : A small text editorDescription :GNU nano is a small and friendly text editor.

DNF 命令:在 Fedora 系統(tǒng)上查看包信息

DNF 指“時(shí)髦版的 YumDandified yum”,我們也可以認(rèn)為 DNF 是下一代的 yum 包管理器(Yum 的一個(gè)分支),它在后臺(tái)使用了 hawkey/libsolv 庫(kù)。Aleš Kozumplík 在Fedora 18 上開始開發(fā) DNF,在 Fedora 22 上正式***發(fā)布。 dnf 命令用來在 Fedora 22 及以后的系統(tǒng)上安裝、更新、搜索以及刪除包。它能自動(dòng)的解決包安裝過程中的包依賴問題。

(LCTT 譯注: 用 dnf info 查看 tilix 包信息)

$ dnf info tilixLast metadata expiration check: 27 days, 10:00:23 ago on Wed 04 Oct 2017 06:43:27 AM IST.Installed PackagesName         : tilixVersion      : 1.6.4Release      : 1.fc26Arch         : x86_64Size         : 3.6 MSource       : tilix-1.6.4-1.fc26.src.rpmRepo         : @SystemFrom repo    : @commandlineSummary      : Tiling terminal emulatorURL          : https://github.com/gnunn1/tilixLicense      : MPLv2.0 and GPLv3+ and CC-BY-SADescription  : Tilix is a tiling terminal emulator with the following features:             :              :  - Layout terminals in any fashion by splitting them horizontally or vertically             :  - Terminals can be re-arranged using drag and drop both within and between             :    windows             :  - Terminals can be detached into a new window via drag and drop             :  - Input can be synchronized between terminals so commands typed in one             :    terminal are replicated to the others             :  - The grouping of terminals can be saved and loaded from disk             :  - Terminals support custom titles             :  - Color schemes are stored in files and custom color schemes can be created by             :    simply creating a new file             :  - Transparent background             :  - Supports notifications when processes are completed out of view             :              : The application was written using GTK 3 and an effort was made to conform to             : GNOME Human Interface Guidelines (HIG).

Zypper 命令:在 openSUSE 系統(tǒng)上查看包信息

zypper 是一個(gè)使用 libzypp 庫(kù)的命令行包管理器。zypper 提供諸如軟件倉(cāng)庫(kù)訪問,安裝依賴解決,軟件包安裝等等功能。

(LCTT 譯注: 用 zypper info 查詢 nano 包的信息)

$ zypper info nano Loading repository data...Reading installed packages...  Information for package nano:-----------------------------Repository     : Main Repository (OSS)              Name           : nano                               Version        : 2.4.2-5.3                          Arch           : x86_64                             Vendor         : openSUSE                           Installed Size : 1017.8 KiB                         Installed      : No                                 Status         : not installed                      Source package : nano-2.4.2-5.3.src                 Summary        : Pico editor clone with enhancementsDescription    :                                        GNU nano is a small and friendly text editor. It aims to emulate    the Pico text editor while also offering a few enhancements.

Pacman 命令:在 ArchLinux 及 Manjaro 系統(tǒng)上查看包信息

Pacman 意即包管理器package manager實(shí)用工具。pacman 是一個(gè)用于安裝、構(gòu)建、刪除、管理 Arch Linux 上包的命令行工具。它后端使用 libalpm(Arch Linux package Manager(ALPM)庫(kù))來完成所有功能。

(LCTT 譯注: 用 pacman -Qi 來查詢 bash 包信息)

$ pacman -Qi bashName            : bashVersion         : 4.4.012-2Description     : The GNU Bourne Again shellArchitecture    : x86_64URL             : http://www.gnu.org/software/bash/bash.htmlLicenses        : GPLGroups          : baseProvides        : shDepends On      : readline>=7.0  glibc  ncursesOptional Deps   : bash-completion: for tab completionRequired By     : autoconf  automake  bison  bzip2  ca-certificates-utils  db                  dhcpcd  diffutils  e2fsprogs  fakeroot  figlet  findutils                  flex  freetype2  gawk  gdbm  gettext  gmp  grub  gzip  icu                  iptables  keyutils  libgpg-error  libksba  libpcap  libpng                  libtool  lvm2  m4  man-db  mkinitcpio  nano  neofetch  nspr                  nss  openresolv  os-prober  pacman  pcre  pcre2  shadow                  systemd  texinfo  vte-common  which  xdg-user-dirs  xdg-utils                  xfsprogs  xorg-mkfontdir  xorg-xpr  xzOptional For    : NoneConflicts With  : NoneReplaces        : NoneInstalled Size  : 7.13 MiBPackager        : Jan Alexander Steffens (heftig) Build Date      : Tue 14 Feb 2017 01:16:51 PM UTCInstall Date    : Thu 24 Aug 2017 06:08:12 AM UTCInstall Reason  : Explicitly installedInstall Script  : NoValidated By    : Signature

apt-cache 命令:在 Debian/Ubuntu/Mint 系統(tǒng)上查看包信息

apt-cache 命令能顯示 apt 內(nèi)部數(shù)據(jù)庫(kù)中的大量信息。這些信息是從 sources.list 中的不同的軟件源中搜集而來,因此從某種意義上這些信息也可以被認(rèn)為是某種緩存。這些信息搜集工作是在運(yùn)行 apt update 命令時(shí)執(zhí)行的。

(LCTT 譯注:用管理員權(quán)限查詢 apache2 包的信息)

$ sudo apt-cache show apache2Package: apache2Priority: optionalSection: webInstalled-Size: 473Maintainer: Ubuntu Developers Original-Maintainer: Debian Apache Maintainers Architecture: amd64Version: 2.4.12-2ubuntu2Replaces: apache2.2-commonProvides: httpd, httpd-cgiDepends: lsb-base, procps, perl, mime-support, apache2-bin (= 2.4.12-2ubuntu2), apache2-utils (>= 2.4), apache2-data (= 2.4.12-2ubuntu2)Pre-Depends: dpkg (>= 1.17.14)Recommends: ssl-certSuggests: www-browser, apache2-doc, apache2-suexec-pristine | apache2-suexec-custom, ufwConflicts: apache2.2-common (<< 2.3~)Filename: pool/main/a/apache2/apache2_2.4.12-2ubuntu2_amd64.debSize: 91348MD5sum: ab0ee0b0d1c6b3d19bd87aa2a9537125SHA1: 350c9a1a954906088ed032aebb77de3d5bb24004SHA256: 03f515f7ebc3b67b050b06e82ebca34b5e83e34a528868498fce020bf1dbbe34Description-en: Apache HTTP Server The Apache HTTP Server Project's goal is to build a secure, efficient and extensible HTTP server as standards-compliant open source software. The result has long been the number one web server on the Internet. . Installing this package results in a full installation, including the configuration files, init scripts and support scripts.Description-md5: d02426bc360345e5acd45367716dc35cHomepage: http://httpd.apache.org/Bugs: https://bugs.launchpad.net/ubuntu/+filebugOrigin: UbuntuSupported: 9mTask: lamp-server, mythbuntu-frontend, mythbuntu-desktop, mythbuntu-backend-slave, mythbuntu-backend-master, mythbuntu-backend-master

APT 命令:查看 Debian/Ubuntu/Mint 系統(tǒng)上的包信息

APT 意為高級(jí)打包工具Advanced Packaging Tool,就像 DNF 將如何替代 YUM 一樣,APT 是 apt-get 的替代物。它功能豐富的命令行工具包括了如下所有命令的功能如 apt-cache、apt-searchdpkg、apt-cdrom、apt-config、apt-key 等等,我們可以方便的通過 apt 來安裝 .dpkg 包,但是我們卻不能通過 apt-get 來完成這一點(diǎn),還有一些其他的類似的功能也不能用 apt-get 來完成,所以 apt-get 因?yàn)闆]有解決上述功能缺乏的原因而被 apt 所取代。

(LCTT 譯注: 用 apt show 查看 nano 包信息)

$ apt show nanoPackage: nanoVersion: 2.8.6-3Priority: standardSection: editorsOrigin: UbuntuMaintainer: Ubuntu Developers Original-Maintainer: Jordi Mallach Bugs: https://bugs.launchpad.net/ubuntu/+filebugInstalled-Size: 766 kBDepends: libc6 (>= 2.14), libncursesw5 (>= 6), libtinfo5 (>= 6)Suggests: spellConflicts: picoBreaks: nano-tiny (<< 2.8.6-2)Replaces: nano-tiny (<< 2.8.6-2), picoHomepage: https://www.nano-editor.org/Task: standard, ubuntu-touch-core, ubuntu-touchSupported: 9mDownload-Size: 222 kBAPT-Manual-Installed: yesAPT-Sources: http://in.archive.ubuntu.com/ubuntu artful/main amd64 PackagesDescription: small, friendly text editor inspired by Pico GNU nano is an easy-to-use text editor originally designed as a replacement for Pico, the ncurses-based editor from the non-free mailer package Pine (itself now available under the Apache License as Alpine). . However, GNU nano also implements many features missing in pico, including:  - undo/redo  - line numbering  - syntax coloring  - soft-wrapping of overlong lines  - selecting text by holding Shift  - interactive search and replace (with regular expression support)  - a go-to line (and column) command  - support for multiple file buffers  - auto-indentation  - tab completion of filenames and search terms  - toggling features while running  - and full internationalization support

dpkg 命令:查看Debian/Ubuntu/Mint系統(tǒng)上的包信息

dpkg 意指Debian 包管理器Debian package manager。dpkg 是用于 Debian 系統(tǒng)上安裝、構(gòu)建、移除以及管理 Debian 包的命令行工具。dpkg 使用 aptitude(因?yàn)樗鼮橹髁骷坝脩粲押茫┳鳛榍岸斯ぞ邅硗瓿伤械墓δ?。其他的工具?code>dpkg-deb 和 dpkg-query 使用 dpkg 做為前端來實(shí)現(xiàn)功能。盡管系統(tǒng)管理員還是時(shí)不時(shí)會(huì)在必要時(shí)使用 dpkg 來完成一些軟件安裝的任務(wù),他大多數(shù)情況下還是會(huì)因?yàn)?apt、apt-get 以及 aptitude 的健壯性而使用后者。

(LCTT 譯注: 用 dpkg -s 查看 python 包的信息)

$ dpkg -s pythonPackage: pythonStatus: install ok installedPriority: optionalSection: pythonInstalled-Size: 626Maintainer: Ubuntu Developers Architecture: amd64Multi-Arch: allowedSource: python-defaultsVersion: 2.7.14-2ubuntu1Replaces: python-dev (<< 2.6.5-2)Provides: python-ctypes, python-email, python-importlib, python-profiler, python-wsgirefDepends: python2.7 (>= 2.7.14-1~), libpython-stdlib (= 2.7.14-2ubuntu1)Pre-Depends: python-minimal (= 2.7.14-2ubuntu1)Suggests: python-doc (= 2.7.14-2ubuntu1), python-tk (>= 2.7.14-1~)Breaks: update-manager-core (<< 0.200.5-2)Conflicts: python-central (<< 0.5.5)Description: interactive high-level object-oriented language (default version) Python, the high-level, interactive object oriented language, includes an extensive class library with lots of goodies for network programming, system administration, sounds and graphics. . This package is a dependency package, which depends on Debian's default Python version (currently v2.7).Homepage: http://www.python.org/Original-Maintainer: Matthias Klose

我們也可使用 dpkg-p 選項(xiàng),這個(gè)選項(xiàng)提供和 dpkg -s 相類似的信息,但是它還提供了包的校驗(yàn)值和包類型。

(LCTT 譯注: 用 dpkg -p 查看 python3 包的信息)

$ dpkg -p python3Package: python3Priority: importantSection: pythonInstalled-Size: 67Origin: UbuntuMaintainer: Ubuntu Developers Bugs: https://bugs.launchpad.net/ubuntu/+filebugArchitecture: amd64Multi-Arch: allowedSource: python3-defaultsVersion: 3.6.3-0ubuntu2Replaces: python3-minimal (<< 3.1.2-2)Provides: python3-profilerDepends: python3.6 (>= 3.6.3-1~), libpython3-stdlib (= 3.6.3-0ubuntu2), dh-pythonPre-Depends: python3-minimal (= 3.6.3-0ubuntu2)Suggests: python3-doc (>= 3.6.3-0ubuntu2), python3-tk (>= 3.6.3-1~), python3-venv (>= 3.6.3-0ubuntu2)Filename: pool/main/p/python3-defaults/python3_3.6.3-0ubuntu2_amd64.debSize: 8712MD5sum: a8bae494c6e5d1896287675faf40d373Description: interactive high-level object-oriented language (default python3 version)Original-Maintainer: Matthias Klose SHA1: 2daec885cea7d4dc83c284301c3bebf42b23e095SHA256: 865e509c91d2504a16c4b573dbe27e260c36fceec2add3fa43a30c1751d7e9bbHomepage: http://www.python.org/Task: minimal, ubuntu-core, ubuntu-coreDescription-md5: 950ebd8122c0a7340f0a740c295b9eabSupported: 9m

aptitude 命令:查看 Debian/Ubuntu/Mint 系統(tǒng)上的包信息

aptitude 是 Debian GNU/Linux 包管理系統(tǒng)的文本界面。它允許用戶查看已安裝的包的列表,以及完成諸如安裝、升級(jí)、刪除包之類的包管理任務(wù)。這些管理行為也能從圖形接口來執(zhí)行。

(LCTT 譯注: 用 aptitude show 查看 htop 包信息)

$ aptitude show htopPackage: htop                     Version: 2.0.2-1State: installedAutomatically installed: noPriority: optionalSection: universe/utilsMaintainer: Ubuntu Developers Architecture: amd64Uncompressed Size: 216 kDepends: libc6 (>= 2.15), libncursesw5 (>= 6), libtinfo5 (>= 6)Suggests: lsof, straceConflicts: htop:i386Description: interactive processes viewer Htop is an ncursed-based process viewer similar to top, but it allows one to scroll the list vertically and horizontally to see all processes and their full command lines.   Tasks related to processes (killing, renicing) can be done without entering their PIDs.Homepage: http://hisham.hm/htop/

以上是“怎么在Linux上檢查一個(gè)軟件包的詳細(xì)信息”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對(duì)大家有所幫助,如果還想學(xué)習(xí)更多知識(shí),歡迎關(guān)注億速云行業(yè)資訊頻道!

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI