如何安装所有rpm依赖项并将本地映射到已创建的YUM存储库?

时间:2019-09-21 20:23:46

标签: centos7 rpm yum

我有一个场景,在Centos 7中拥有带有较新版本的NodeJS rpm的yum存储库(例如名为A),当我尝试安装该库时,它最终出现在依赖项错误列表中,并且很少有rpm软件包无法自行找到它由YUM。因此,请下载所有的rpm依赖项,并将其放置在创建的存储库中。开始使用此命令安装rpm

rpm -ivh http-parser

然后尝试使用此命令获取已安装软件包的信息

yum info http-parser

列出了以下信息

Installed Packages
Name        : http-parser
Arch        : x86_64
Version     : 2.7.1
Release     : 8.el7
Size        : 71 k
Repo        : installed
Summary     : HTTP request/response parser for C
URL         : https://github.com/nodejs/http-parser
License     : MIT
Description : This is a parser for HTTP messages written in C. It
            : parses both requests and responses. The parser is
            : designed to be used in performance HTTP
            : applications. It does not make any syscalls nor
            : allocations, it does not buffer data, it can be
            : interrupted at anytime. Depending on your
            : architecture, it only requires about 40 bytes of
            : data per message stream (in a web server that is per
            : connection).

我打算安装此软件包并映射到创建的自定义存储库(名称为A)。但是info命令显示它是通过全局“回购:已安装”而不是“回购:A”安装的。我怀疑我错过了一些步骤来安装已创建存储库本地的依赖项。如何验证该软件包是否已安装并且在存储库本地可用?

我想知道这是否是在centos软件包安装中处理依赖项错误的正确方法吗?

对此有任何指导。谢谢!

1 个答案:

答案 0 :(得分:1)

yum不记得它是从哪个仓库安装的。当您向yum询问有关它所知道的名为http-parser的任何软件包的任何信息时,它告诉您它知道当前已安装的软件包。为此,它使用保留名称“已安装”。