Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/go/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Go 从源代码生成runc时出错_Go_Containers_Runc - Fatal编程技术网

Go 从源代码生成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

从源代码安装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
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