Go 从源代码生成runc时出错
从源代码安装runc时遇到问题:Go 从源代码生成runc时出错,go,containers,runc,Go,Containers,Runc,从源代码安装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
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
root@ubuntu:/usr/local/go/bin/src/github.com/opencontainers/runc#make
转到构建-标记“seccomp”-o runc。
#github.com/seccomp/libseccomp-golang
Godeps/_workspace/src/github.com/seccomp/libseccomp golang/seccomp.go:25:22:致命错误:seccomp.h:没有这样的文件或目录
//#包括
^
编译终止。
make:**[全部]错误2
看起来像:
这不是问题。您需要
libseccomp-dev
库,以便使用seccomp
支持构建runc。您仍然可以通过go build标志禁用此功能
提到:
要启用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)用作分配中的int64类型。/spec.go:456:错误太多:**[all]错误2