首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Fedora上建立码头RPM

在Fedora上建立码头RPM
EN

Stack Overflow用户
提问于 2015-03-18 10:34:11
回答 1查看 665关注 0票数 2

我正在尝试从src.rpm构建RPM,用于fedora的码头。我从这里得到了src.rpm包:http://koji.fedoraproject.org/koji/buildinfo?buildID=610523

我正在遵循以下指南:Guide/ch11s03.html

现在,当我运行rpmbuild时,我会得到以下错误:

代码语言:javascript
复制
[peeyush@localhost ~]$ rpmbuild --rebuild docker-io-1.5.0-1.fc21.src.rpm 
Installing docker-io-1.5.0-1.fc21.src.rpm
error: Failed build dependencies:
    btrfs-progs-devel is needed by docker-io-1.5.0-1.fc21.x86_64
    device-mapper-devel is needed by docker-io-1.5.0-1.fc21.x86_64
    glibc-static is needed by docker-io-1.5.0-1.fc21.x86_64
    go-md2man is needed by docker-io-1.5.0-1.fc21.x86_64
    golang(code.google.com/p/go.net/websocket) is needed by docker-io-1.5.0-1.fc21.x86_64
    golang(code.google.com/p/gosqlite/sqlite3) is needed by docker-io-1.5.0-1.fc21.x86_64
    golang(github.com/Sirupsen/logrus) >= 0.6.0 is needed by docker-io-1.5.0-1.fc21.x86_64
    golang(github.com/coreos/go-systemd/activation) >= 2-1 is needed by docker-io-1.5.0-1.fc21.x86_64
    golang(github.com/docker/libtrust) >= 0-0.2 is needed by docker-io-1.5.0-1.fc21.x86_64
    golang(github.com/docker/libtrust/trustgraph) >= 0-0.2 is needed by docker-io-1.5.0-1.fc21.x86_64
    golang(github.com/godbus/dbus) is needed by docker-io-1.5.0-1.fc21.x86_64
    golang(github.com/gorilla/mux) >= 0-0.13 is needed by docker-io-1.5.0-1.fc21.x86_64
    golang(github.com/kr/pty) >= 0-0.19 is needed by docker-io-1.5.0-1.fc21.x86_64
    golang(github.com/syndtr/gocapability/capability) >= 0-0.7 is needed by docker-io-1.5.0-1.fc21.x86_64
    golang(github.com/tchap/go-patricia/patricia) is needed by docker-io-1.5.0-1.fc21.x86_64

有趣的是,我已经安装了golang:

代码语言:javascript
复制
[peeyush@localhost ~]$ rpm -q golang
golang-1.3.3-1.fc21.x86_64

请帮我弄清楚这里有什么问题吗?或者你能告诉我是否有其他的方法来建造码头RPM。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-03-18 13:19:29

首先,如果您的目标只是安装较新版本的Docker软件包,请考虑:

代码语言:javascript
复制
# yum --enablerepo=updates-testing install docker-io

现在这会给你带来docker-io.x86_64 0:1.5.0-2.fc21

在构建包之前,您需要安装所有所需的依赖项。您可以使用rpm -q手动检查源RPM。

代码语言:javascript
复制
$ rpm -qp --requires docker-io-1.5.0-1.fc21.src.rpm
btrfs-progs-devel
device-mapper-devel
glibc-static
go-md2man
golang >= 1.2.1-3
golang >= 1.3.3
golang(code.google.com/p/go.net/websocket)
golang(code.google.com/p/gosqlite/sqlite3)
golang(github.com/Sirupsen/logrus) >= 0.6.0
golang(github.com/coreos/go-systemd/activation) >= 2-1
golang(github.com/docker/libtrust) >= 0-0.2
golang(github.com/docker/libtrust/trustgraph) >= 0-0.2
golang(github.com/godbus/dbus)
golang(github.com/gorilla/mux) >= 0-0.13
golang(github.com/kr/pty) >= 0-0.19
golang(github.com/syndtr/gocapability/capability) >= 0-0.7
golang(github.com/tchap/go-patricia/patricia)
pkgconfig(systemd)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1

您可以手动安装这些需求,确保满足版本要求,也可以使用yum-builddep命令实现流程自动化,yum-utils包中有该命令:

代码语言:javascript
复制
$ sudo yum-builddep docker-io-1.5.0-1.fc21.src.rpm 

这可能会告诉你:

代码语言:javascript
复制
[...]
Error: No Package found for golang(github.com/docker/libtrust) >= 0-0.2
Error: No Package found for golang(github.com/docker/libtrust/trustgraph) >= 0-0.2

这是因为您要构建的包依赖于尚未发布的包。它们位于updates-testing存储库中,因此您可以运行:

代码语言:javascript
复制
$ sudo yum-builddep --enablerepo=updates-testing \
  docker-io-1.5.0-1.fc21.src.rpm

这将安装所有的要求。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29119698

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档