时间:2021-05-19
dockerfile
docker run 报错信息:
[root@zxg]# docker run --rm -it -p 9999:9999 web:1.0panic: standard_init_linux.go:178: exec user process caused "no such file or directory" [recovered] panic: standard_init_linux.go:178: exec user process caused "no such file or directory"goroutine 1 [running, locked to thread]:panic(0x6f2340, 0xc420132620) /usr/lib/golang/src/runtime/panic.go:500 +0x1a1github.com/urfave/cli.HandleAction.func1(0xc420091748) /builddir/build/BUILD/docker-1398f249013601ab999d286910664d70fd1329a2/runc-f5721697226d42d9efeea37fa3a7eb1d208fa1a2/Godeps/_workspace/src/github.com/urfave/cli/app.go:478 +0x247panic(0x6f2340, 0xc420132620) /usr/lib/golang/src/runtime/panic.go:458 +0x243github.com/opencontainers/runc/libcontainer.(*LinuxFactory).StartInitialization.func1(0xc420091198, 0xc42001e050, 0xc420091238) /builddir/build/BUILD/docker-1398f249013601ab999d286910664d70fd1329a2/runc-f5721697226d42d9efeea37fa3a7eb1d208fa1a2/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/factory_linux.go:259 +0x18fgithub.com/opencontainers/runc/libcontainer.(*LinuxFactory).StartInitialization(0xc42004efa0, 0xaab9c0, 0xc420132620) /builddir/build/BUILD/docker-1398f249013601ab999d286910664d70fd1329a2/runc-f5721697226d42d9efeea37fa3a7eb1d208fa1a2/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/factory_linux.go:277 +0x353main.glob..func8(0xc4200ba3c0, 0x0, 0x0) /builddir/build/BUILD/docker-1398f249013601ab999d286910664d70fd1329a2/runc-f5721697226d42d9efeea37fa3a7eb1d208fa1a2/main_unix.go:26 +0x66reflect.Value.call(0x6dd0c0, 0x768ec8, 0x13, 0x73b509, 0x4, 0xc420091708, 0x1, 0x1, 0x4d17a8, 0x731360, ...) /usr/lib/golang/src/reflect/value.go:434 +0x5c8reflect.Value.Call(0x6dd0c0, 0x768ec8, 0x13, 0xc420091708, 0x1, 0x1, 0xac1700, 0xc4200916e8, 0x4da786) /usr/lib/golang/src/reflect/value.go:302 +0xa4github.com/urfave/cli.HandleAction(0x6dd0c0, 0x768ec8, 0xc4200ba3c0, 0x0, 0x0) /builddir/build/BUILD/docker-1398f249013601ab999d286910664d70fd1329a2/runc-f5721697226d42d9efeea37fa3a7eb1d208fa1a2/Godeps/_workspace/src/github.com/urfave/cli/app.go:487 +0x1e0github.com/urfave/cli.Command.Run(0x73b6d5, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x74cc8a, 0x51, 0x0, ...) /builddir/build/BUILD/docker-1398f249013601ab999d286910664d70fd1329a2/runc-f5721697226d42d9efeea37fa3a7eb1d208fa1a2/Godeps/_workspace/src/github.com/urfave/cli/command.go:191 +0xc3bgithub.com/urfave/cli.(*App).Run(0xc4200cc000, 0xc420064060, 0x2, 0x2, 0x0, 0x0) /builddir/build/BUILD/docker-1398f249013601ab999d286910664d70fd1329a2/runc-f5721697226d42d9efeea37fa3a7eb1d208fa1a2/Godeps/_workspace/src/github.com/urfave/cli/app.go:240 +0x611main.main() /builddir/build/BUILD/docker-1398f249013601ab999d286910664d70fd1329a2/runc-f5721697226d42d9efeea37fa3a7eb1d208fa1a2/main.go:137 +0xbd6解决办法:增加-tags netgo选项编译
GOOS=linux GOARCH=amd64 go build -tags netgo -o rollingupdate${TAG} main.go总结
以上所述是小编给大家介绍的好的docker 容器上编译 go 程序无法运行提示找不到文件问题,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对网站的支持!
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
很多时候,使用一些特别的库,在编译可执行程序时,需要添加额外的CFLAGS和LIBS.否则会提示找不到指定的头文件或者"undefinedreferenceto
情况一:问题idea项目突然无法运行,提示找不到某个类。查看了编译输出目录out,发现没有class文件。尝试解决尝试删除out、重新导入项目、在gradle面
今天尝试在IDEA中使用Lombok,但是在编译时,提示找不到set()和get()方法,我明明在javabean中使用了@Data注解,但是编译器就是找不到。
Docker是一个基于Linux容器(LXC-linuxcontainer)的高级容器引擎,基于go语言开发,源代码托管在Github上,遵从Apache2.0
因为公司的项目改过项目名字,在xcode下编译正常,但是用appcode打开,xcode项目的workspace的时候,提示找不到xcodeproj项目文件问了