在构建RPM软件包之前自动安装构建依赖项 [英] Automatically install build dependencies prior to building an RPM package

查看:149
本文介绍了在构建RPM软件包之前自动安装构建依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建.rpm软件包.我刚刚按照步骤进行操作.到现在为止,所有步骤都进行得很顺利,但现在我只停留在这一步上.我只是运行以下命令,并收到此错误:

I am trying to build a .rpm package. I have just followed the steps to do that. Till now all steps were gone fine but now i just stuck with this step. I just ran the following command and got this error:

rpmbuild -ba asterisk.spec

error: Failed build dependencies: 
    gtk2-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
    libsrtp-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
    [... more ...]
    freetds-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
    uw-imap-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64

我正在使用fedora-15.如何解决这个错误?

I am using fedora-15. How to resolve this error?

在安装src.rpm软件包的过程中如何安装所有独立功能.有可能吗?

How I do install all depencencies during installation of src.rpm package. Is it possible?

推荐答案

您可以使用yum-utils软件包中的yum-builddep命令来安装软件包的所有构建依赖项.

You can use the yum-builddep command from the yum-utils package to install all the build dependencies for a package.

参数可以是规范文件的路径,源RPM的路径,也可以是已配置存储库中作为源RPM存在的软件包的名称,例如:

The arguments can either be paths to spec files, paths to source RPMs or the names of packages which exist as source RPMs in a configured repository, for example:

yum-builddep my-package.spec

yum-builddep my-package.src.rpm

在使用dnf作为其软件包管理器的Fedora的较新版本中,可以通过确保已安装dnf-plugins-core然后执行以下操作来实现相同的目的:

The same thing can be achieved on newer versions of Fedora that use dnf as their package manager by making sure that dnf-plugins-core is installed and then doing:

dnf builddep my-package.spec

dnf builddep my-package.src.rpm

这篇关于在构建RPM软件包之前自动安装构建依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆