如何安装 rpm 文件及其所有依赖项?

She*_*har 23 linux rpm installation rhel-6

我正在尝试HPCC在基于 RHEL 的机器上安装。

我有一个.rpm文件并要安装这个 rpm,我使用以下命令:

sudo rpm -Uvh hpccsystems-platform_community-4.0.0-9.el6.x86_64.rpm
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

error: Failed dependencies:
        boost-regex is needed by hpccsystems-platform-community-4.0.09.x86_64
        expect is needed by hpccsystems-platform-community-4.0.09.x86_64
        gcc-c++ is needed by hpccsystems-platform-community-4.0.09.x86_64
        libapr-1.so.0()(64bit) is needed by hpccsystems-platform-community-4.0.09.x86_64
        libaprutil-1.so.0()(64bit) is needed by hpccsystems-platform-community-4.0.09.x86_64
        libarchive is needed by hpccsystems-platform-community-4.0.09.x86_64
        liblber-2.4.so.2()(64bit) is needed by hpccsystems-platform-community-4.0.09.x86_64
        libldap_r-2.4.so.2()(64bit) is needed by hpccsystems-platform-community-4.0.09.x86_64
        libssl.so.10()(64bit) is needed by hpccsystems-platform-community-4.0.09.x86_64
4.0.09.x86_64
Run Code Online (Sandbox Code Playgroud)

请注意,这是我第一次使用 RHEL。我使用过 Ubuntu,在 Ubuntu 中,使用apt-get install获取软件及其依赖项的命令来安装软件更容易。

如何安装它rpm并自动安装它的所有依赖项?

Ign*_*ams 34

使用 yum 代替。

yum localinstall ...
Run Code Online (Sandbox Code Playgroud)

例如:

yum localinstall http://pkgs.repoforge.org/subversion/subversion-devel-1.7.1-0.1.el6.rfx.i686.rpm
Run Code Online (Sandbox Code Playgroud)

上面的示例将自动安装 rpm 及其依赖项。


小智 5

你可以创建本地 yum 存储库,然后运行命令

百胜安装 hpccsystems-platform_community-4.0.0-9.el6.x86_64.rpm

或者找到该包可用的在线存储库,然后将 url 放入 .repo 文件的 baseurl 中。