This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed last month.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
您可以使用
apt-cachepolicy
来获取该信息(aptitude
使用与apt-cachepolicy
所示相同的存储库)。显示有关结构包的版本和存储库信息。
正如另一个答案中指出的,您还可以使用
来获取或多或少相同的信息(格式略有不同)。
You can use
apt-cache policy
to get that information (aptitude
uses the same repositories as shown withapt-cache policy
).Shows version and repository information about the fabric package.
As pointed out in another answer, you can also use
to get more or less the same information (in a slightly different format).
要使用 aptitude 显示可用存储库,您可以尝试:
这应该显示包的所有可用存储库,并且还会在末尾列出策略优先级。也许还检查 /etc/apt/sources.list
To show available repository using aptitude you can try:
This should display all available repositories for the package and it will also list the policy priority at the end. Maybe also check /etc/apt/sources.list
不太确定这是一个堆栈溢出问题:似乎更多是系统管理员问题而不是软件开发问题。无论如何,我也不确定您是否可以将 Aptitude 与 YUM 一起使用:Aptitude 通常在基于 Debian 的平台上使用 apt-get ,而 yum 通常用于 Fedora/Red-hat 平台。
从安装了该软件包的计算机上的命令行,您通常可以执行
以下操作: dpkg -l | grep列出所有匹配的已安装软件包,然后执行
apt-cache madison
查看该软件包来自哪个存储库。Not quite sure this is a stack overflow problem: seems more a system admin than a software dev question. In any case, I'm also not sure you can use Aptitude with YUM: Aptitude typically uses
apt-get
on Debian-based platforms, while yum is generally for Fedora/Red-hat platforms.From a command line on a machine with the package installed you can typically do:
dpkg -l | grep <package>
to list all matching installed packages and then doapt-cache madison <packagename>
to see what repo the package came from.运行以下一行 Bash shell 脚本来列出所有已安装的软件包以及安装它们的存储库名称。
对于一个包,只需运行:
Run the following one-liner Bash shell script to list all the installed packages along with the repository names from which they are installed.
for one package just run: