有时候你可能想知道安装的软件包来自于哪个仓库。这将帮助你在遇到包冲突问题时进行故障排除。因为第三方仓库拥有最新版本的软件包,所以有时候当你试图安装一些包的时候会出现兼容性的问题。在 Linux 上一切都是可能的,因为你可以安装一个即使在你的发行版系统上不能使用的包。你也可以安装一个最新版本的包,即使你的发行版系统仓库还没有这个版本,怎么做到的呢?这就是为什么出现了第三方仓库。它们允许用户从库中安装所有可用的包。
# yum info apachetop Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * epel: epel.mirror.constant.com Installed Packages Name : apachetop Arch : x86_64 Version : 0.15.6 Release : 1.el7 Size : 65 k Repo : installed From repo : epel Summary : A top-like display of Apache logs URL : https://github.com/tessus/apachetop License : BSD Description : ApacheTop watches a logfile generated by Apache (in standard common or : combined logformat, although it doesn't (yet) make useof any of the extra : fieldsin combined) and generates human-parsable output in realtime.
apachetop 包来自 EPEL 仓库。
方法-2:使用 yumdb 命令
yumdb info 提供了类似于 yum info 的信息但是它又提供了包校验和数据、类型、用户信息(谁安装的软件包)。从 yum 3.2.26 开始,yum 已经开始在 rpmdatabase 之外存储额外的信息(user 表示软件是用户安装的,dep 表示它是作为依赖项引入的)。
# rpm -qi apachetop Name : apachetop Version : 0.15.6 Release : 1.el7 Architecture: x86_64 Install Date: Mon 29 Oct 201806:47:49 AM EDT Group : Applications/Internet Size : 67020 License : BSD Signature : RSA/SHA256, Mon 22 Jun 201509:30:26 AM EDT, Key ID 6a2faea2352c64e5 Source RPM : apachetop-0.15.6-1.el7.src.rpm Build Date : Sat 20 Jun 201509:02:37 PM EDT Build Host : buildvm-22.phx2.fedoraproject.org Relocations : (not relocatable) Packager : Fedora Project Vendor : Fedora Project URL : https://github.com/tessus/apachetop Summary : A top-like display of Apache logs Description : ApacheTop watches a logfile generated by Apache (in standard common or combined logformat, although it doesn't (yet) make use of any of the extra fields in combined) and generates human-parsable output in realtime.
apachetop 包来自 EPEL 仓库。
方法-4:使用 repoquery 命令
repoquery 是一个从 YUM 库查询信息的程序,类似于 rpm 查询。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
# repoquery -i httpd
Name :httpd Version :2.4.6 Release :80.el7.centos.1 Architecture:x86_64 Size :9817285 Packager :CentOS BuildSystem Group :System Environment/Daemons URL :http://httpd.apache.org/ Repository :updates Summary :Apache HTTP Server Source :httpd-2.4.6-80.el7.centos.1.src.rpm Description : The Apache HTTP Server is a powerful, efficient, and extensible web server.
$ dnf info tilix Last metadata expiration check: 27 days, 10:00:23 ago on Wed 04 Oct 201706:43:27 AM IST. Installed Packages Name : tilix Version : 1.6.4 Release : 1.fc26 Arch : x86_64 Size : 3.6 M Source : tilix-1.6.4-1.fc26.src.rpm Repo : @System From repo : updates Summary : Tiling terminal emulator URL : https://github.com/gnunn1/tilix License : MPLv2.0and GPLv3+ and CC-BY-SA Description : Tilixis 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 outof view : : The application was written using GTK 3and an effort was made to conform to : GNOME Human Interface Guidelines (HIG).
Information forpackagenano: ----------------------------- 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 : notinstalled Source package: nano-2.4.2-5.3.src Summary : Pico editor clone with enhancements Description : GNU nano is a small and friendly text editor. It aims to emulate the Pico text editor while also offering a few enhancements.
# pacman -Ss chromium extra/chromium 48.0.2564.116-1 The open-source project behind Google Chrome, an attempt at creating a safer, faster, and more stable browser extra/qt5-webengine 5.5.1-9 (qt qt5) Provides support for web applications using the Chromium browser project community/chromium-bsu 0.9.15.1-2 A fast paced top scrolling shooter community/chromium-chromevox latest-1 Causes the Chromium web browser to automatically install and update the ChromeVox screen reader extention. Note: This package does not contain the extension code. community/fcitx-mozc 2.17.2313.102-1 Fcitx Module of A Japanese Input Method for Chromium OS, Windows, Mac and Linux (the Open Source Edition of Google Japanese Input)