【问题标题】:Error building runc from source从源代码构建 runc 时出错
【发布时间】:2016-04-13 23:08:15
【问题描述】:

我从源代码安装 runc 时遇到问题:

root@ubuntu:/usr/local/go/bin/src/github.com/opencontainers/runc# make
go build -tags "seccomp" -o runc .
# github.com/seccomp/libseccomp-golang
Godeps/_workspace/src/github.com/seccomp/libseccomp-golang/seccomp.go:25:22: fatal error: seccomp.h: No such file or directory
 // #include <seccomp.h>
                      ^
compilation terminated.
make: *** [all] Error 2

【问题讨论】:

    标签: go containers runc


    【解决方案1】:

    看起来像issue 226

    这不是问题。
    您需要libseccomp-dev 库才能构建具有seccomp 支持的runc。你仍然可以通过 go build flags 禁用它。

    PR 220 提及:

    为了启用seccomp 支持,您需要在您的平台上安装 libseccomp。
    如果您不支持使用 seccomp 构建 runc,您可以在运行 make 时添加 BUILDTAGS=""

    【讨论】:

    • sudo make BUILDTAGS="" GOPATH=$GOPATH go build -tags "" -o runc 。 # github.com/opencontainers/runc ./spec.go:447: 不能使用 r.Memory.Limit (type *uint64) as type int64 in assignment ./spec.go:456: too many errors make: *** [全部] 错误 2
    猜你喜欢
    • 2015-10-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-18
    • 1970-01-01
    相关资源
    最近更新 更多